瀏覽代碼

Reenable BWC after backporting #53730 (#54230)

Updates a few versions in serialization because we didn't make the 7.7.0
release train.
Nik Everett 5 年之前
父節點
當前提交
53c62782b7

+ 2 - 2
build.gradle

@@ -222,8 +222,8 @@ task verifyVersions {
  * after the backport of the backcompat code is complete.
  */
 
-boolean bwc_tests_enabled = false
-final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/54161" /* place a PR link here when committing bwc changes */
+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")

+ 2 - 2
server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java

@@ -165,7 +165,7 @@ public abstract class InternalAggregation implements Aggregation, NamedWriteable
     protected InternalAggregation(StreamInput in) throws IOException {
         name = in.readString();
         metaData = in.readMap();
-        if (in.getVersion().before(Version.V_8_0_0)) {
+        if (in.getVersion().before(Version.V_7_8_0)) {
             pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class);
         } else {
             pipelineAggregators = emptyList();
@@ -176,7 +176,7 @@ public abstract class InternalAggregation implements Aggregation, NamedWriteable
     public final void writeTo(StreamOutput out) throws IOException {
         out.writeString(name);
         out.writeGenericValue(metaData);
-        if (out.getVersion().before(Version.V_8_0_0)) {
+        if (out.getVersion().before(Version.V_7_8_0)) {
             out.writeNamedWriteableList(pipelineAggregators);
         }
         doWriteTo(out);

+ 2 - 2
server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregations.java

@@ -86,7 +86,7 @@ public final class InternalAggregations extends Aggregations implements Writeabl
 
     public InternalAggregations(StreamInput in) throws IOException {
         super(in.readList(stream -> in.readNamedWriteable(InternalAggregation.class)));
-        if (in.getVersion().before(Version.V_7_7_0)) {
+        if (in.getVersion().before(Version.V_7_8_0)) {
             in.readNamedWriteableList(PipelineAggregator.class); 
         }
         /*
@@ -103,7 +103,7 @@ public final class InternalAggregations extends Aggregations implements Writeabl
     @SuppressWarnings("unchecked")
     public void writeTo(StreamOutput out) throws IOException {
         out.writeNamedWriteableList((List<InternalAggregation>)aggregations);
-        if (out.getVersion().before(Version.V_7_7_0)) {
+        if (out.getVersion().before(Version.V_7_8_0)) {
             if (pipelineTreeForBwcSerialization == null) {
                 out.writeNamedWriteableList(emptyList());
             } else {