Skip to content

Commit

Permalink
Changing remotestore based metrics version to 2.10 (#9389)
Browse files Browse the repository at this point in the history
Signed-off-by: Shourya Dutta Biswas <[email protected]>
  • Loading branch information
shourya035 authored Aug 16, 2023
1 parent 5a25350 commit 8d153ab
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ public SegmentsStats(StreamInput in) throws IOException {
bitsetMemoryInBytes = in.readLong();
maxUnsafeAutoIdTimestamp = in.readLong();
fileSizes = in.readMap(StreamInput::readString, StreamInput::readLong);
// TODO Update to 2_10_0 when we backport to 2.x
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_10_0)) {
remoteSegmentStats = in.readOptionalWriteable(RemoteSegmentStats::new);
} else {
remoteSegmentStats = new RemoteSegmentStats();
Expand Down Expand Up @@ -306,8 +305,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeLong(bitsetMemoryInBytes);
out.writeLong(maxUnsafeAutoIdTimestamp);
out.writeMap(this.fileSizes, StreamOutput::writeString, StreamOutput::writeLong);
// TODO Update to 2_10_0 when we backport to 2.x
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_10_0)) {
out.writeOptionalWriteable(remoteSegmentStats);
}
}
Expand Down

0 comments on commit 8d153ab

Please sign in to comment.