diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java index 9b1583f3aedd0..a26df3501dc96 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java @@ -102,7 +102,7 @@ public CommonStatsFlags(StreamInput in) throws IOException { includeUnloadedSegments = in.readBoolean(); includeAllShardIndexingPressureTrackers = in.readBoolean(); includeOnlyTopIndexingPressureMetrics = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_2_16_0)) { + if (in.getVersion().onOrAfter(Version.V_3_0_0)) { optimizeNodeIndicesStatsOnLevel = in.readOptionalBoolean(); logger.info("In.Version - " + in.getVersion()); logger.info("In.Flag - " + optimizeNodeIndicesStatsOnLevel); @@ -131,7 +131,7 @@ public void writeTo(StreamOutput out) throws IOException { out.writeBoolean(includeUnloadedSegments); out.writeBoolean(includeAllShardIndexingPressureTrackers); out.writeBoolean(includeOnlyTopIndexingPressureMetrics); - if (out.getVersion().onOrAfter(Version.V_2_16_0)) { + if (out.getVersion().onOrAfter(Version.V_3_0_0)) { out.writeOptionalBoolean(optimizeNodeIndicesStatsOnLevel); logger.info("Out.Version - " + out.getVersion()); logger.info("Out.Flag - " + optimizeNodeIndicesStatsOnLevel);