Browse Source

Adapt BWC condition for clone index API after backport (#44267)

Changes the BWC conditions for the clone index API after backport of the feature to 7.x
Yannick Welsch 6 years ago
parent
commit
ad64ec197b

+ 4 - 4
rest-api-spec/src/main/resources/rest-api-spec/test/indices.clone/10_basic.yml

@@ -29,8 +29,8 @@ setup:
 ---
 "Clone index via API":
   - skip:
-      version: " - 7.99.99"
-      reason: index cloning was added in 8.0.0
+      version: " - 7.3.99"
+      reason: index cloning was added in 7.4.0
   # make it read-only
   - do:
       indices.put_settings:
@@ -95,8 +95,8 @@ setup:
 ---
 "Create illegal clone indices":
   - skip:
-      version: " - 7.99.99"
-      reason: index cloning was added in 8.0.0
+      version: " - 7.3.99"
+      reason: index cloning was added in 7.4.0
   # try to do an illegal clone with illegal number_of_shards
   - do:
       catch: /illegal_argument_exception/

+ 2 - 2
rest-api-spec/src/main/resources/rest-api-spec/test/indices.clone/20_source_mapping.yml

@@ -1,8 +1,8 @@
 ---
 "Clone index ignores target template mapping":
   - skip:
-      version: " - 7.99.99"
-      reason: index cloning was added in 8.0.0
+      version: " - 7.3.99"
+      reason: index cloning was added in 7.4.0
   # create index
   - do:
       indices.create:

+ 2 - 2
rest-api-spec/src/main/resources/rest-api-spec/test/indices.clone/30_copy_settings.yml

@@ -1,8 +1,8 @@
 ---
 "Copy settings during clone index":
   - skip:
-      version: " - 7.99.99"
-      reason: index cloning was added in 8.0.0
+      version: " - 7.3.99"
+      reason: index cloning was added in 7.4.0
       features: [arbitrary_key]
 
   - do:

+ 2 - 2
server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequest.java

@@ -101,8 +101,8 @@ public class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements
         super.writeTo(out);
         targetIndexRequest.writeTo(out);
         out.writeString(sourceIndex);
-        if (type == ResizeType.CLONE && out.getVersion().before(Version.V_8_0_0)) {
-            throw new IllegalArgumentException("can't send clone request to a node that's older than " + Version.V_8_0_0);
+        if (type == ResizeType.CLONE && out.getVersion().before(Version.V_7_4_0)) {
+            throw new IllegalArgumentException("can't send clone request to a node that's older than " + Version.V_7_4_0);
         }
         out.writeEnum(type);
         out.writeOptionalBoolean(copySettings);