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]>
  • Loading branch information
amkhar and Aman Khare authored Oct 25, 2023
1 parent a890e51 commit 3e64a7b
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 3e64a7b

Please sign in to comment.