Skip to content

Commit

Permalink
Change version to 2.12.0 for cluster state stats (opensearch-project#…
Browse files Browse the repository at this point in the history
…10915)

Signed-off-by: Aman Khare <[email protected]>
Co-authored-by: Aman Khare <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
2 people authored and shiv0408 committed Apr 25, 2024
1 parent 33195fd commit fc47f9a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public DiscoveryStats(PendingClusterStateStats queueStats, PublishClusterStateSt
public DiscoveryStats(StreamInput in) throws IOException {
queueStats = in.readOptionalWriteable(PendingClusterStateStats::new);
publishStats = in.readOptionalWriteable(PublishClusterStateStats::new);
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_12_0)) {
clusterStateStats = in.readOptionalWriteable(ClusterStateStats::new);
} else {
clusterStateStats = null;
Expand All @@ -75,7 +75,7 @@ public DiscoveryStats(StreamInput in) throws IOException {
public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(queueStats);
out.writeOptionalWriteable(publishStats);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
out.writeOptionalWriteable(clusterStateStats);
}
}
Expand Down

0 comments on commit fc47f9a

Please sign in to comment.