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 <[email protected]>
Co-authored-by: Rishav Sagar <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
2 people authored and shiv0408 committed Apr 25, 2024
1 parent 98c7d45 commit b162a53
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 b162a53

Please sign in to comment.