Преглед изворни кода

Adjust BWC conditions after backport of #70441

Yannick Welsch пре 4 година
родитељ
комит
81e661db5f

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

@@ -27,7 +27,7 @@ public class SearchableSnapshotFeatureSetUsage extends XPackFeatureSet.Usage {
     public SearchableSnapshotFeatureSetUsage(StreamInput input) throws IOException {
         super(input);
         numberOfSearchableSnapshotIndices = input.readVInt();
-        if (input.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (input.getVersion().onOrAfter(Version.V_7_13_0)) {
             numberOfFullCopySearchableSnapshotIndices = input.readVInt();
             numberOfSharedCacheSearchableSnapshotIndices = input.readVInt();
         } else {
@@ -45,7 +45,7 @@ public class SearchableSnapshotFeatureSetUsage extends XPackFeatureSet.Usage {
     public void writeTo(StreamOutput out) throws IOException {
         super.writeTo(out);
         out.writeVInt(numberOfSearchableSnapshotIndices);
-        if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (out.getVersion().onOrAfter(Version.V_7_13_0)) {
             out.writeVInt(numberOfFullCopySearchableSnapshotIndices);
             out.writeVInt(numberOfSharedCacheSearchableSnapshotIndices);
         }

+ 2 - 2
x-pack/plugin/src/test/resources/rest-api-spec/test/searchable_snapshots/10_usage.yml

@@ -99,8 +99,8 @@ teardown:
 ---
 "Tests searchable snapshots usage stats with full_copy and shared_cache indices":
   - skip:
-      version: " - 7.99.99"
-      reason:  "extra full_copy and shared_cache fields introduced in 8.0.0"
+      version: " - 7.12.99"
+      reason:  "extra full_copy and shared_cache fields introduced in 7.13.0"
 
   - do:
       xpack.usage: {}