Fix BWC error on pipeline aggs (#54672)

I derped out on a last minute bug fix when backporting #54282 and it
only causes the tests to fail about half the time. So I didn't catch
it until after merging. Great! This fixes it.
This commit is contained in:
Nik Everett 2020-04-02 14:51:30 -04:00 committed by GitHub
parent 4e083cd97d
commit cc6468a0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator.PipelineTree;
import org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator;
import org.elasticsearch.search.aggregations.support.AggregationPath;
import java.io.IOException;
@ -114,7 +114,7 @@ public final class InternalAggregations extends Aggregations implements Writeabl
mergePipelineTreeForBWCSerialization(pipelineTree);
out.writeNamedWriteableList(getInternalAggregations());
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeNamedWriteableList(emptyList());
out.writeNamedWriteableList(pipelineTree.aggregators());
}
}
} else {