diff --git a/build.gradle b/build.gradle index 4d23e66873b..7e067b89978 100644 --- a/build.gradle +++ b/build.gradle @@ -163,8 +163,8 @@ task verifyVersions { * the enabled state of every bwc task. It should be set back to true * after the backport of the backcompat code is complete. */ -final boolean bwc_tests_enabled = false -final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/36555" /* place a PR link here when committing bwc changes */ +final boolean bwc_tests_enabled = true +final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */ if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java b/server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java index 59e6c437809..7d80b769aa5 100644 --- a/server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java +++ b/server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java @@ -282,7 +282,7 @@ public class DeleteRequest extends ReplicatedWriteRequest } version = in.readLong(); versionType = VersionType.fromValue(in.readByte()); - if (in.getVersion().onOrAfter(Version.V_7_0_0)) { + if (in.getVersion().onOrAfter(Version.V_6_6_0)) { ifSeqNo = in.readZLong(); ifPrimaryTerm = in.readVLong(); } else { @@ -302,7 +302,7 @@ public class DeleteRequest extends ReplicatedWriteRequest } out.writeLong(version); out.writeByte(versionType.getValue()); - if (out.getVersion().onOrAfter(Version.V_7_0_0)) { + if (out.getVersion().onOrAfter(Version.V_6_6_0)) { out.writeZLong(ifSeqNo); out.writeVLong(ifPrimaryTerm); } else if (ifSeqNo != SequenceNumbers.UNASSIGNED_SEQ_NO || ifPrimaryTerm != 0) { diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java b/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java index e2c097a39b0..46028a7c036 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java @@ -616,7 +616,7 @@ public class IndexRequest extends ReplicatedWriteRequest implement } else { contentType = null; } - if (in.getVersion().onOrAfter(Version.V_7_0_0)) { + if (in.getVersion().onOrAfter(Version.V_6_6_0)) { ifSeqNo = in.readZLong(); ifPrimaryTerm = in.readVLong(); } else { @@ -654,7 +654,7 @@ public class IndexRequest extends ReplicatedWriteRequest implement } else { out.writeBoolean(false); } - if (out.getVersion().onOrAfter(Version.V_7_0_0)) { + if (out.getVersion().onOrAfter(Version.V_6_6_0)) { out.writeZLong(ifSeqNo); out.writeVLong(ifPrimaryTerm); } else if (ifSeqNo != SequenceNumbers.UNASSIGNED_SEQ_NO || ifPrimaryTerm != 0) { diff --git a/server/src/main/java/org/elasticsearch/index/get/GetResult.java b/server/src/main/java/org/elasticsearch/index/get/GetResult.java index 2b3b1b8f4f2..5ec448888b3 100644 --- a/server/src/main/java/org/elasticsearch/index/get/GetResult.java +++ b/server/src/main/java/org/elasticsearch/index/get/GetResult.java @@ -384,7 +384,7 @@ public class GetResult implements Streamable, Iterable, ToXConten index = in.readString(); type = in.readOptionalString(); id = in.readString(); - if (in.getVersion().onOrAfter(Version.V_7_0_0)) { + if (in.getVersion().onOrAfter(Version.V_6_6_0)) { seqNo = in.readZLong(); primaryTerm = in.readVLong(); } else { @@ -416,7 +416,7 @@ public class GetResult implements Streamable, Iterable, ToXConten out.writeString(index); out.writeOptionalString(type); out.writeString(id); - if (out.getVersion().onOrAfter(Version.V_7_0_0)) { + if (out.getVersion().onOrAfter(Version.V_6_6_0)) { out.writeZLong(seqNo); out.writeVLong(primaryTerm); }