Skip to content

Commit

Permalink
Update version guards to deal for new query profile collector fields (o…
Browse files Browse the repository at this point in the history
…pensearch-project#7979)

Signed-off-by: Ticheng Lin <[email protected]>
Signed-off-by: Rishab Nahata <[email protected]>
  • Loading branch information
ticheng-aws authored and imRishN committed Jun 27, 2023
1 parent 74232e1 commit 55bce00
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public CollectorResult(StreamInput in) throws IOException {
CollectorResult child = new CollectorResult(in);
this.children.add(child);
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_9_0)) {
this.reduceTime = in.readLong();
this.maxSliceTime = in.readLong();
this.minSliceTime = in.readLong();
Expand All @@ -188,7 +188,7 @@ public void writeTo(StreamOutput out) throws IOException {
for (CollectorResult child : children) {
child.writeTo(out);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_9_0)) {
out.writeLong(reduceTime);
out.writeLong(maxSliceTime);
out.writeLong(minSliceTime);
Expand Down

0 comments on commit 55bce00

Please sign in to comment.