Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 1e67a8a

Browse files
author
Vladimir Dolzhenko
committed
Allow to trim all ops above a certain seq# with a term lower than X - fixes on PR elastic#4
Relates to elastic#10708
1 parent 2a9c58c commit 1e67a8a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/action/resync/ResyncReplicationRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void readFrom(final StreamInput in) throws IOException {
6868
throw new IllegalStateException("resync replication request serialization is broken in 6.0.0");
6969
}
7070
super.readFrom(in);
71-
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
71+
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
7272
trimAboveSeqNo = in.readZLong();
7373
} else {
7474
trimAboveSeqNo = SequenceNumbers.UNASSIGNED_SEQ_NO;
@@ -79,7 +79,7 @@ public void readFrom(final StreamInput in) throws IOException {
7979
@Override
8080
public void writeTo(final StreamOutput out) throws IOException {
8181
super.writeTo(out);
82-
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
82+
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
8383
out.writeZLong(trimAboveSeqNo);
8484
}
8585
out.writeArray(Translog.Operation::writeOperation, operations);

server/src/main/java/org/elasticsearch/index/translog/Checkpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ final class Checkpoint {
5353

5454
private static final String CHECKPOINT_CODEC = "ckp";
5555

56-
// size of 6.4.0 checkpoint
56+
// size of 7.0.0 checkpoint
5757

5858
static final int V3_FILE_SIZE = CodecUtil.headerLength(CHECKPOINT_CODEC)
5959
+ Integer.BYTES // ops

0 commit comments

Comments
 (0)