Backport replica rollback to 6.2 (#28181)

Relates #28181
This commit is contained in:
Nhat Nguyen 2018-01-12 21:02:31 -05:00
parent e44e34f42a
commit 0151c1565d

View File

@ -50,7 +50,7 @@ class RecoveryPrepareForTranslogOperationsRequest extends TransportRequest {
if (in.getVersion().before(Version.V_6_0_0_alpha1)) { if (in.getVersion().before(Version.V_6_0_0_alpha1)) {
in.readLong(); // maxUnsafeAutoIdTimestamp in.readLong(); // maxUnsafeAutoIdTimestamp
} }
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (in.getVersion().onOrAfter(Version.V_6_2_0)) {
createNewTranslog = in.readBoolean(); createNewTranslog = in.readBoolean();
} else { } else {
createNewTranslog = true; createNewTranslog = true;
@ -82,7 +82,7 @@ class RecoveryPrepareForTranslogOperationsRequest extends TransportRequest {
out.writeLong(recoveryId); out.writeLong(recoveryId);
shardId.writeTo(out); shardId.writeTo(out);
out.writeVInt(totalTranslogOps); out.writeVInt(totalTranslogOps);
if (out.getVersion().before(Version.V_6_0_0_alpha1)) { if (out.getVersion().before(Version.V_6_2_0)) {
out.writeLong(IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP); // maxUnsafeAutoIdTimestamp out.writeLong(IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP); // maxUnsafeAutoIdTimestamp
} }
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {