Skip to content

Commit

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

Signed-off-by: Ticheng Lin <[email protected]>
  • Loading branch information
ticheng-aws authored Jun 9, 2023
1 parent 16c9d5e commit 52326d7
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 52326d7

Please sign in to comment.