Skip to content

Commit 12fa0f4

Browse files
Allow to trim all ops above a certain seq# with a term lower than X, post backport fix (#31211)
1 parent b26aae3 commit 12fa0f4

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

Lines changed: 2 additions & 2 deletions
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_7_0_0_alpha1)) {
71+
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
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_7_0_0_alpha1)) {
82+
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
8383
out.writeZLong(trimAboveSeqNo);
8484
}
8585
out.writeArray(Translog.Operation::writeOperation, operations);

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

Lines changed: 1 addition & 1 deletion
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 7.0.0 checkpoint
56+
// size of 6.4.0 checkpoint
5757

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

0 commit comments

Comments
 (0)