Przeglądaj źródła

Adapt BWC after backport of #70464

Yannick Welsch 4 lat temu
rodzic
commit
7d75698986

+ 2 - 2
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/searchablesnapshots/SearchableSnapshotShardStats.java

@@ -212,7 +212,7 @@ public class SearchableSnapshotShardStats implements Writeable, ToXContentObject
             this.directBytesRead = new TimedCounter(in);
             this.optimizedBytesRead = new TimedCounter(in);
             this.blobStoreBytesRequested = new Counter(in);
-            if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
+            if (in.getVersion().onOrAfter(Version.V_7_13_0)) {
                 this.luceneBytesRead = new Counter(in);
             } else {
                 this.luceneBytesRead = new Counter(0, 0, 0, 0);
@@ -283,7 +283,7 @@ public class SearchableSnapshotShardStats implements Writeable, ToXContentObject
             directBytesRead.writeTo(out);
             optimizedBytesRead.writeTo(out);
             blobStoreBytesRequested.writeTo(out);
-            if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
+            if (out.getVersion().onOrAfter(Version.V_7_13_0)) {
                 luceneBytesRead.writeTo(out);
             }
             out.writeVLong(currentIndexCacheFills);

+ 2 - 2
x-pack/plugin/searchable-snapshots/qa/rest/src/test/resources/rest-api-spec/test/stats.yml

@@ -66,8 +66,8 @@ teardown:
 ---
 "Tests searchable snapshots stats":
   - skip:
-      version: " - 7.99.99"
-      reason: adapt after backport
+      version: " - 7.12.99"
+      reason:  searchable snapshots response format changed in 7.13.0
 
   - do:
       catch: missing