Skip to content

Commit

Permalink
Adjust serialization versions for prefer_v2_templates flag (#55478)
Browse files Browse the repository at this point in the history
This adjusts the minimum version for serialization for #55411.

It should only be merged after #55476 has been merged
  • Loading branch information
dakrone authored Apr 20, 2020
1 parent 5fd2918 commit 93021f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"Component and index template composition":
- skip:
version: " - 7.9.99"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

Expand Down Expand Up @@ -89,7 +89,7 @@
---
"Index template priority":
- skip:
version: " - 7.9.99"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

Expand Down Expand Up @@ -133,7 +133,7 @@
---
"Component template only composition":
- skip:
version: " - 7.9.99"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

Expand Down Expand Up @@ -179,7 +179,7 @@
---
"Index template without component templates":
- skip:
version: " - 7.9.99"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

Expand Down Expand Up @@ -208,8 +208,8 @@
---
"Version 1 templates are preferred if the flag is set":
- skip:
version: " - 7.9.99"
reason: "not backported yet"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public CreateIndexRequest(StreamInput in) throws IOException {
aliases.add(new Alias(in));
}
waitForActiveShards = ActiveShardCount.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
preferV2Templates = in.readOptionalBoolean();
}
}
Expand Down Expand Up @@ -484,7 +484,7 @@ public void writeTo(StreamOutput out) throws IOException {
alias.writeTo(out);
}
waitForActiveShards.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeOptionalBoolean(preferV2Templates);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public BulkRequest(StreamInput in) throws IOException {
}
refreshPolicy = RefreshPolicy.readFrom(in);
timeout = in.readTimeValue();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
this.preferV2Templates = in.readOptionalBoolean();
}
}
Expand Down Expand Up @@ -371,7 +371,7 @@ public void writeTo(StreamOutput out) throws IOException {
}
refreshPolicy.writeTo(out);
out.writeTimeValue(timeout);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeOptionalBoolean(preferV2Templates);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public IndexRequest(StreamInput in) throws IOException {
}
ifSeqNo = in.readZLong();
ifPrimaryTerm = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
this.preferV2Templates = in.readOptionalBoolean();
}
}
Expand Down Expand Up @@ -656,7 +656,7 @@ public void writeTo(StreamOutput out) throws IOException {
}
out.writeZLong(ifSeqNo);
out.writeVLong(ifPrimaryTerm);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeOptionalBoolean(preferV2Templates);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public UpdateRequest(StreamInput in) throws IOException {
ifPrimaryTerm = in.readVLong();
detectNoop = in.readBoolean();
scriptedUpsert = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
preferV2Templates = in.readOptionalBoolean();
}
}
Expand Down Expand Up @@ -855,7 +855,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(ifPrimaryTerm);
out.writeBoolean(detectNoop);
out.writeBoolean(scriptedUpsert);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeOptionalBoolean(preferV2Templates);
}
}
Expand Down

0 comments on commit 93021f7

Please sign in to comment.