Fix BWC for discovery stats

The new discovery stats were pushed to the 6.x branch (currently
versioned at 6.1.0) but master was not updated to reflect this. This
impacts the mixed-cluster BWC tests because a 6.1.0 node will be trying
to send a 7.0.0 node the new discovery stats but the 7.0.0 did not yet
understand that it should be reading these when talking to a 6.1.0
node. This commit addresses this, and changes the skip version on the
discovery stats REST tests.
This commit is contained in:
Jason Tedor 2017-10-26 07:53:18 -04:00
parent f1e944a675
commit 0174d13ca2
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ public class DiscoveryStats implements Writeable, ToXContentFragment {
public DiscoveryStats(StreamInput in) throws IOException {
queueStats = in.readOptionalWriteable(PendingClusterStateStats::new);
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
publishStats = in.readOptionalWriteable(PublishClusterStateStats::new);
} else {
publishStats = null;
@ -55,7 +55,7 @@ public class DiscoveryStats implements Writeable, ToXContentFragment {
public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(queueStats);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeOptionalWriteable(publishStats);
}
}

View File

@ -1,8 +1,8 @@
---
"Discovery stats":
- skip:
version: " - 6.99.99"
reason: "published_cluster_states_received is not (yet) in 6.x"
version: " - 6.0.99"
reason: "published_cluster_states_received arrived in 6.1.0"
- do:
cluster.state: {}