Skip to content

Commit

Permalink
Update version back to 2_10_0 in Segmentstats. (#9745)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
  • Loading branch information
Rishikesh1159 authored Sep 5, 2023
1 parent aa83670 commit d426801
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,9 @@ public SegmentsStats(StreamInput in) throws IOException {
fileSizes = in.readMap(StreamInput::readString, StreamInput::readLong);
if (in.getVersion().onOrAfter(Version.V_2_10_0)) {
remoteSegmentStats = in.readOptionalWriteable(RemoteSegmentStats::new);
} else {
remoteSegmentStats = new RemoteSegmentStats();
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
replicationStats = in.readOptionalWriteable(ReplicationStats::new);
} else {
remoteSegmentStats = new RemoteSegmentStats();
replicationStats = new ReplicationStats();
}
}
Expand Down Expand Up @@ -329,8 +326,6 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeMap(this.fileSizes, StreamOutput::writeString, StreamOutput::writeLong);
if (out.getVersion().onOrAfter(Version.V_2_10_0)) {
out.writeOptionalWriteable(remoteSegmentStats);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
out.writeOptionalWriteable(replicationStats);
}
}
Expand Down

0 comments on commit d426801

Please sign in to comment.