Skip to content

Commit b08bebd

Browse files
dreamer-89kotwanikunal
authored andcommitted
Send replicated boolean on supported versions (#5808)
Signed-off-by: Suraj Singh <surajrider@gmail.com> Signed-off-by: Suraj Singh <surajrider@gmail.com>
1 parent 06f2e47 commit b08bebd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ public CheckpointState(StreamInput in) throws IOException {
712712
this.globalCheckpoint = in.readZLong();
713713
this.inSync = in.readBoolean();
714714
this.tracked = in.readBoolean();
715-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
715+
if (in.getVersion().onOrAfter(Version.V_2_5_0)) {
716716
this.replicated = in.readBoolean();
717717
} else {
718718
this.replicated = true;
@@ -725,7 +725,9 @@ public void writeTo(StreamOutput out) throws IOException {
725725
out.writeZLong(globalCheckpoint);
726726
out.writeBoolean(inSync);
727727
out.writeBoolean(tracked);
728-
out.writeBoolean(replicated);
728+
if (out.getVersion().onOrAfter(Version.V_2_5_0)) {
729+
out.writeBoolean(replicated);
730+
}
729731
}
730732

731733
/**

0 commit comments

Comments
 (0)