Skip to content

Commit

Permalink
Changing unrefernced file cleanup stats based MergeStats metrics vers…
Browse files Browse the repository at this point in the history
…ion to 2.11 (opensearch-project#10336)

Signed-off-by: Rishav Sagar <rissag@amazon.com>
Co-authored-by: Rishav Sagar <rissag@amazon.com>
  • Loading branch information
2 people authored and deshsidd committed Oct 9, 2023
1 parent 79522c8 commit 9707d27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public MergeStats(StreamInput in) throws IOException {
totalStoppedTimeInMillis = in.readVLong();
totalThrottledTimeInMillis = in.readVLong();
totalBytesPerSecAutoThrottle = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_11_0)) {
unreferencedFileCleanUpsPerformed = in.readOptionalVLong();
}
}
Expand Down Expand Up @@ -297,7 +297,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(totalStoppedTimeInMillis);
out.writeVLong(totalThrottledTimeInMillis);
out.writeVLong(totalBytesPerSecAutoThrottle);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_11_0)) {
out.writeOptionalVLong(unreferencedFileCleanUpsPerformed);
}
}
Expand Down

0 comments on commit 9707d27

Please sign in to comment.