From f2f08dd6c5a69a4db69a5e78f73021204c0a9e9f Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Sat, 22 Sep 2018 19:28:20 -0400 Subject: [PATCH] Adjust bwc for recovery request (#33693) Relates #33693 --- .../indices/recovery/RecoveryTranslogOperationsRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java index 3adb5695e0290..ae74673d30d80 100644 --- a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java +++ b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java @@ -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; @@ -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); } }