Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into stats-rollup-max-bytes-lag
Browse files Browse the repository at this point in the history
  • Loading branch information
shourya035 committed Aug 16, 2023
2 parents 70590e6 + 8d153ab commit 3d5d827
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 3d5d827

Please sign in to comment.