Skip to content

Commit

Permalink
Send replicated boolean on supported versions (#5808)
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <surajrider@gmail.com>

Signed-off-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
dreamer-89 authored and kotwanikunal committed Jan 25, 2023
1 parent 06f2e47 commit b08bebd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ public CheckpointState(StreamInput in) throws IOException {
this.globalCheckpoint = in.readZLong();
this.inSync = in.readBoolean();
this.tracked = in.readBoolean();
if (in.getVersion().onOrAfter(Version.CURRENT)) {
if (in.getVersion().onOrAfter(Version.V_2_5_0)) {
this.replicated = in.readBoolean();
} else {
this.replicated = true;
Expand All @@ -725,7 +725,9 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeZLong(globalCheckpoint);
out.writeBoolean(inSync);
out.writeBoolean(tracked);
out.writeBoolean(replicated);
if (out.getVersion().onOrAfter(Version.V_2_5_0)) {
out.writeBoolean(replicated);
}
}

/**
Expand Down

0 comments on commit b08bebd

Please sign in to comment.