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 vikasvb90 committed Oct 10, 2023
1 parent ce51b2b commit a500a2b
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 a500a2b

Please sign in to comment.