Adjust bwc for resync request (#33964)

Relates #33964
This commit is contained in:
Nhat Nguyen 2018-09-22 19:29:18 -04:00
parent f2f08dd6c5
commit 432e61c971
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public final class ResyncReplicationRequest extends ReplicatedWriteRequest<Resyn
} else { } else {
trimAboveSeqNo = SequenceNumbers.UNASSIGNED_SEQ_NO; trimAboveSeqNo = SequenceNumbers.UNASSIGNED_SEQ_NO;
} }
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (in.getVersion().onOrAfter(Version.V_6_5_0)) {
maxSeenAutoIdTimestampOnPrimary = in.readZLong(); maxSeenAutoIdTimestampOnPrimary = in.readZLong();
} else { } else {
maxSeenAutoIdTimestampOnPrimary = IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP; maxSeenAutoIdTimestampOnPrimary = IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP;
@ -95,7 +95,7 @@ public final class ResyncReplicationRequest extends ReplicatedWriteRequest<Resyn
if (out.getVersion().onOrAfter(Version.V_6_4_0)) { if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
out.writeZLong(trimAboveSeqNo); out.writeZLong(trimAboveSeqNo);
} }
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeZLong(maxSeenAutoIdTimestampOnPrimary); out.writeZLong(maxSeenAutoIdTimestampOnPrimary);
} }
out.writeArray(Translog.Operation::writeOperation, operations); out.writeArray(Translog.Operation::writeOperation, operations);