Skip to content

Commit

Permalink
Change RTS stats version check to V_2_10_0
Browse files Browse the repository at this point in the history
Signed-off-by: Bhumika Saini <sabhumik@amazon.com>
  • Loading branch information
Bhumika Saini committed Sep 7, 2023
1 parent 579e8d9 commit 7f15b9c
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ public TranslogStats(StreamInput in) throws IOException {
uncommittedOperations = in.readVInt();
uncommittedSizeInBytes = in.readVLong();
earliestLastModifiedAge = in.readVLong();
// TODO: remoteTranslogStats = in.getVersion().onOrAfter(Version.V_2_10_0) ? in.readOptionalWriteable(RemoteTranslogStats::new) :
// new RemoteTranslogStats();
remoteTranslogStats = in.getVersion().onOrAfter(Version.CURRENT)
remoteTranslogStats = in.getVersion().onOrAfter(Version.V_2_10_0)
? in.readOptionalWriteable(RemoteTranslogStats::new)
: new RemoteTranslogStats();
}
Expand Down Expand Up @@ -184,8 +182,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(uncommittedOperations);
out.writeVLong(uncommittedSizeInBytes);
out.writeVLong(earliestLastModifiedAge);
// TODO: if (out.getVersion().onOrAfter(Version.V_2_10_0)) {
if (out.getVersion().onOrAfter(Version.CURRENT)) {
if (out.getVersion().onOrAfter(Version.V_2_10_0)) {
out.writeOptionalWriteable(remoteTranslogStats);
}
}
Expand Down

0 comments on commit 7f15b9c

Please sign in to comment.