Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust serialization versions for prefer_v2_templates flag #55478

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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