Skip to content

Commit

Permalink
Adjust bwc for recovery request (#33693)
Browse files Browse the repository at this point in the history
Relates #33693
  • Loading branch information
dnhatn committed Sep 22, 2018
1 parent e7ae2f9 commit f2f08dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void readFrom(StreamInput in) throws IOException {
shardId = ShardId.readShardId(in);
operations = Translog.readOperations(in, "recovery");
totalTranslogOps = in.readVInt();
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_5_0)) {
maxSeenAutoIdTimestampOnPrimary = in.readZLong();
} else {
maxSeenAutoIdTimestampOnPrimary = IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP;
Expand All @@ -91,7 +91,7 @@ public void writeTo(StreamOutput out) throws IOException {
shardId.writeTo(out);
Translog.writeOperations(out, operations);
out.writeVInt(totalTranslogOps);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeZLong(maxSeenAutoIdTimestampOnPrimary);
}
}
Expand Down

0 comments on commit f2f08dd

Please sign in to comment.