Skip to content

Commit

Permalink
Adjust versions for resize copy settings (#30578)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasontedor committed May 14, 2018
1 parent 1b0e6ee commit 4e33443
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"Shrink index via API":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"
# creates an index with one document solely allocated on the master node
# and shrinks it into a new index with a single shard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"Shrink index ignores target template mapping":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

- do:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"Copy settings during shrink index":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ setup:
---
"Split index via API":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

# make it read-only
Expand Down Expand Up @@ -110,8 +110,8 @@ setup:
# when re-enabling uncomment the below skips
version: "all"
reason: "AwaitsFix'ing, see https://github.com/elastic/elasticsearch/issues/30503"
# version: " - 6.99.99"
# reason: expects warnings that pre-7.0.0 will not send
# version: " - 6.3.99"
# reason: expects warnings that pre-6.4.0 will not send
features: "warnings"
- do:
indices.create:
Expand Down Expand Up @@ -213,8 +213,8 @@ setup:
---
"Create illegal split indices":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

# try to do an illegal split with number_of_routing_shards set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# when re-enabling uncomment the below skips
version: "all"
reason: "AwaitsFix'ing, see https://github.com/elastic/elasticsearch/issues/30503"
# version: " - 6.99.99"
# reason: expects warnings that pre-7.0.0 will not send
# version: " - 6.3.99"
# reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

# create index
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"Copy settings during split index":
- skip:
version: " - 6.99.99"
reason: expects warnings that pre-7.0.0 will not send
version: " - 6.3.99"
reason: expects warnings that pre-6.4.0 will not send
features: "warnings"

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ public void readFrom(StreamInput in) throws IOException {
}
if (in.getVersion().before(Version.V_6_4_0)) {
copySettings = null;
} else if (in.getVersion().onOrAfter(Version.V_6_4_0) && in.getVersion().before(Version.V_7_0_0_alpha1)){
copySettings = in.readBoolean();
} else {
copySettings = in.readOptionalBoolean();
}
Expand All @@ -116,10 +114,9 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(ResizeAction.COMPATIBILITY_VERSION)) {
out.writeEnum(type);
}
// noinspection StatementWithEmptyBody
if (out.getVersion().before(Version.V_6_4_0)) {

} else if (out.getVersion().onOrAfter(Version.V_6_4_0) && out.getVersion().before(Version.V_7_0_0_alpha1)) {
out.writeBoolean(copySettings == null ? false : copySettings);
} else {
out.writeOptionalBoolean(copySettings);
}
Expand Down

0 comments on commit 4e33443

Please sign in to comment.