Skip to content

Commit

Permalink
Send replicated boolean on supported versions (#5808) (#5811)
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>
(cherry picked from commit ef3a58f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 15a1c0e commit 8debbed
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 8debbed

Please sign in to comment.