Browse Source

Unmute bwc tests and adjust bwc serialization in DiscoveryStats (#78917)

See #77552
Martijn van Groningen 4 years ago
parent
commit
11840f0940

+ 2 - 2
build.gradle

@@ -134,9 +134,9 @@ tasks.register("verifyVersions") {
  * after the backport of the backcompat code is complete.
  */
 
-boolean bwc_tests_enabled = false
+boolean bwc_tests_enabled = true
 // place a PR link here when committing bwc changes:
-String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/77552"
+String bwc_tests_disabled_issue = ""
 /*
  * FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
  * JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

+ 2 - 2
server/src/main/java/org/elasticsearch/discovery/DiscoveryStats.java

@@ -47,7 +47,7 @@ public class DiscoveryStats implements Writeable, ToXContentFragment {
         } else {
             clusterStateUpdateStats = null;
         }
-        if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (in.getVersion().onOrAfter(Version.V_7_16_0)) {
             applierRecordingStats = in.readOptionalWriteable(ClusterApplierRecordingService.Stats::new);
         } else {
             applierRecordingStats = null;
@@ -61,7 +61,7 @@ public class DiscoveryStats implements Writeable, ToXContentFragment {
         if (out.getVersion().onOrAfter(Version.V_7_16_0)) {
             out.writeOptionalWriteable(clusterStateUpdateStats);
         }
-        if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (out.getVersion().onOrAfter(Version.V_7_16_0)) {
             out.writeOptionalWriteable(applierRecordingStats);
         }
     }