Skip to content

Commit 00d4d7e

Browse files
committed
Updating versions for NodeIndicesStats Optimisation to 2.17
Signed-off-by: Pranshu Shukla <[email protected]>
1 parent 7d70148 commit 00d4d7e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public CommonStatsFlags(StreamInput in) throws IOException {
107107
includeCaches = in.readEnumSet(CacheType.class);
108108
levels = in.readStringArray();
109109
}
110-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
110+
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
111111
includeIndicesStatsByLevel = in.readBoolean();
112112
}
113113
}
@@ -139,7 +139,7 @@ public void writeTo(StreamOutput out) throws IOException {
139139
out.writeEnumSet(includeCaches);
140140
out.writeStringArrayNullable(levels);
141141
}
142-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
142+
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
143143
out.writeBoolean(includeIndicesStatsByLevel);
144144
}
145145
}

server/src/main/java/org/opensearch/indices/NodeIndicesStats.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class NodeIndicesStats implements Writeable, ToXContentFragment {
8383

8484
public NodeIndicesStats(StreamInput in) throws IOException {
8585
stats = new CommonStats(in);
86-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
86+
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
8787
// contains statsByIndex
8888
if (in.readBoolean()) {
8989
statsByIndex = readStatsByIndex(in);
@@ -284,7 +284,7 @@ public RecoveryStats getRecoveryStats() {
284284
public void writeTo(StreamOutput out) throws IOException {
285285
stats.writeTo(out);
286286

287-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
287+
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
288288
out.writeBoolean(statsByIndex != null);
289289
if (statsByIndex != null) {
290290
writeStatsByIndex(out);
@@ -410,7 +410,7 @@ public List<IndexShardStats> getShardStats(Index index) {
410410
*
411411
* @opensearch.internal
412412
*/
413-
@PublicApi(since = "3.0.0")
413+
@PublicApi(since = "2.17.0")
414414
public enum StatsLevel {
415415
INDICES("indices"),
416416
SHARDS("shards"),

0 commit comments

Comments
 (0)