Skip to content

[Transform] finalize backport of retention_policy and reenable BWC #68884

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

Merged
merged 2 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ tasks.register("verifyVersions") {
* after the backport of the backcompat code is complete.
*/

boolean bwc_tests_enabled = false
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/68814" /* place a PR link here when committing bwc changes */
boolean bwc_tests_enabled = true
String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
/*
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public TransformConfig(final StreamInput in) throws IOException {
} else {
settings = new SettingsConfig();
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (in.getVersion().onOrAfter(Version.V_7_12_0)) {
retentionPolicyConfig = in.readOptionalNamedWriteable(RetentionPolicyConfig.class);
} else {
retentionPolicyConfig = null;
Expand Down Expand Up @@ -366,7 +366,7 @@ public void writeTo(final StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
settings.writeTo(out);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (out.getVersion().onOrAfter(Version.V_7_12_0)) {
out.writeOptionalNamedWriteable(retentionPolicyConfig);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public TransformConfigUpdate(final StreamInput in) throws IOException {
} else {
settings = null;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (in.getVersion().onOrAfter(Version.V_7_12_0)) {
retentionPolicyConfig = in.readOptionalNamedWriteable(RetentionPolicyConfig.class);
} else {
retentionPolicyConfig = null;
Expand Down Expand Up @@ -184,7 +184,7 @@ public void writeTo(final StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeOptionalWriteable(settings);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (out.getVersion().onOrAfter(Version.V_7_12_0)) {
out.writeOptionalNamedWriteable(retentionPolicyConfig);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public TransformIndexerStats(StreamInput in) throws IOException {
this.expAvgDocumentsIndexed = in.readDouble();
this.expAvgDocumentsProcessed = in.readDouble();
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (in.getVersion().onOrAfter(Version.V_7_12_0)) {
this.numDeletedDocuments = in.readVLong();
this.deleteTime = in.readVLong();
}
Expand All @@ -199,7 +199,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeDouble(this.expAvgDocumentsIndexed);
out.writeDouble(this.expAvgDocumentsProcessed);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { // todo: V_7_12_0
if (out.getVersion().onOrAfter(Version.V_7_12_0)) {
out.writeVLong(numDeletedDocuments);
out.writeVLong(deleteTime);
}
Expand Down