Skip to content

Commit

Permalink
Change version to 2.12.0 for cluster state stats (#10915)
Browse files Browse the repository at this point in the history
Signed-off-by: Aman Khare <amkhar@amazon.com>
Co-authored-by: Aman Khare <amkhar@amazon.com>
  • 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.