Skip to content

Commit d340467

Browse files
ywelschjkakavas
authored andcommitted
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
1 parent c9a9d9e commit d340467

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ setup:
2929
---
3030
"Clone index via API":
3131
- skip:
32-
version: " - 7.99.99"
33-
reason: index cloning was added in 8.0.0
32+
version: " - 7.3.99"
33+
reason: index cloning was added in 7.4.0
3434
# make it read-only
3535
- do:
3636
indices.put_settings:
@@ -95,8 +95,8 @@ setup:
9595
---
9696
"Create illegal clone indices":
9797
- skip:
98-
version: " - 7.99.99"
99-
reason: index cloning was added in 8.0.0
98+
version: " - 7.3.99"
99+
reason: index cloning was added in 7.4.0
100100
# try to do an illegal clone with illegal number_of_shards
101101
- do:
102102
catch: /illegal_argument_exception/

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Clone index ignores target template mapping":
33
- skip:
4-
version: " - 7.99.99"
5-
reason: index cloning was added in 8.0.0
4+
version: " - 7.3.99"
5+
reason: index cloning was added in 7.4.0
66
# create index
77
- do:
88
indices.create:

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Copy settings during clone index":
33
- skip:
4-
version: " - 7.99.99"
5-
reason: index cloning was added in 8.0.0
4+
version: " - 7.3.99"
5+
reason: index cloning was added in 7.4.0
66
features: [arbitrary_key]
77

88
- do:

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public void writeTo(StreamOutput out) throws IOException {
101101
super.writeTo(out);
102102
targetIndexRequest.writeTo(out);
103103
out.writeString(sourceIndex);
104-
if (type == ResizeType.CLONE && out.getVersion().before(Version.V_8_0_0)) {
105-
throw new IllegalArgumentException("can't send clone request to a node that's older than " + Version.V_8_0_0);
104+
if (type == ResizeType.CLONE && out.getVersion().before(Version.V_7_4_0)) {
105+
throw new IllegalArgumentException("can't send clone request to a node that's older than " + Version.V_7_4_0);
106106
}
107107
out.writeEnum(type);
108108
out.writeOptionalBoolean(copySettings);

0 commit comments

Comments
 (0)