Skip to content

Commit 4e33443

Browse files
authored
Adjust versions for resize copy settings (#30578)
Now that the change to deprecate copy settings and disallow it being explicitly set to false is backported, this commit adjusts the BWC versions in master.
1 parent 1b0e6ee commit 4e33443

File tree

7 files changed

+17
-20
lines changed

7 files changed

+17
-20
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Shrink index via API":
33
- skip:
4-
version: " - 6.99.99"
5-
reason: expects warnings that pre-7.0.0 will not send
4+
version: " - 6.3.99"
5+
reason: expects warnings that pre-6.4.0 will not send
66
features: "warnings"
77
# creates an index with one document solely allocated on the master node
88
# and shrinks it into a new index with a single shard

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Shrink index ignores target template mapping":
33
- skip:
4-
version: " - 6.99.99"
5-
reason: expects warnings that pre-7.0.0 will not send
4+
version: " - 6.3.99"
5+
reason: expects warnings that pre-6.4.0 will not send
66
features: "warnings"
77

88
- do:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Copy settings during shrink index":
33
- skip:
4-
version: " - 6.99.99"
5-
reason: expects warnings that pre-7.0.0 will not send
4+
version: " - 6.3.99"
5+
reason: expects warnings that pre-6.4.0 will not send
66
features: "warnings"
77

88
- do:

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ setup:
3333
---
3434
"Split index via API":
3535
- skip:
36-
version: " - 6.99.99"
37-
reason: expects warnings that pre-7.0.0 will not send
36+
version: " - 6.3.99"
37+
reason: expects warnings that pre-6.4.0 will not send
3838
features: "warnings"
3939

4040
# make it read-only
@@ -110,8 +110,8 @@ setup:
110110
# when re-enabling uncomment the below skips
111111
version: "all"
112112
reason: "AwaitsFix'ing, see https://github.com/elastic/elasticsearch/issues/30503"
113-
# version: " - 6.99.99"
114-
# reason: expects warnings that pre-7.0.0 will not send
113+
# version: " - 6.3.99"
114+
# reason: expects warnings that pre-6.4.0 will not send
115115
features: "warnings"
116116
- do:
117117
indices.create:
@@ -213,8 +213,8 @@ setup:
213213
---
214214
"Create illegal split indices":
215215
- skip:
216-
version: " - 6.99.99"
217-
reason: expects warnings that pre-7.0.0 will not send
216+
version: " - 6.3.99"
217+
reason: expects warnings that pre-6.4.0 will not send
218218
features: "warnings"
219219

220220
# try to do an illegal split with number_of_routing_shards set

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# when re-enabling uncomment the below skips
55
version: "all"
66
reason: "AwaitsFix'ing, see https://github.com/elastic/elasticsearch/issues/30503"
7-
# version: " - 6.99.99"
8-
# reason: expects warnings that pre-7.0.0 will not send
7+
# version: " - 6.3.99"
8+
# reason: expects warnings that pre-6.4.0 will not send
99
features: "warnings"
1010

1111
# create index

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
"Copy settings during split index":
33
- skip:
4-
version: " - 6.99.99"
5-
reason: expects warnings that pre-7.0.0 will not send
4+
version: " - 6.3.99"
5+
reason: expects warnings that pre-6.4.0 will not send
66
features: "warnings"
77

88
- do:

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ public void readFrom(StreamInput in) throws IOException {
101101
}
102102
if (in.getVersion().before(Version.V_6_4_0)) {
103103
copySettings = null;
104-
} else if (in.getVersion().onOrAfter(Version.V_6_4_0) && in.getVersion().before(Version.V_7_0_0_alpha1)){
105-
copySettings = in.readBoolean();
106104
} else {
107105
copySettings = in.readOptionalBoolean();
108106
}
@@ -116,10 +114,9 @@ public void writeTo(StreamOutput out) throws IOException {
116114
if (out.getVersion().onOrAfter(ResizeAction.COMPATIBILITY_VERSION)) {
117115
out.writeEnum(type);
118116
}
117+
// noinspection StatementWithEmptyBody
119118
if (out.getVersion().before(Version.V_6_4_0)) {
120119

121-
} else if (out.getVersion().onOrAfter(Version.V_6_4_0) && out.getVersion().before(Version.V_7_0_0_alpha1)) {
122-
out.writeBoolean(copySettings == null ? false : copySettings);
123120
} else {
124121
out.writeOptionalBoolean(copySettings);
125122
}

0 commit comments

Comments
 (0)