Skip to content

Commit e157b27

Browse files
committed
Filter pre-6.0 nodes for checkpoint invariants
When checking that the global checkpoint on the primary is consistent with the local checkpoints of the in-sync shards, we have to filter pre-6.0 nodes from the check or the invariant will trivially trip. This commit filters these nodes out when checking this invariant. Relates #26666
1 parent 13b5062 commit e157b27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/elasticsearch/index/seqno/GlobalCheckpointTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private static long inSyncCheckpointStates(
316316
.stream()
317317
.filter(cps -> cps.inSync)
318318
.mapToLong(function)
319-
.filter(v -> v != SequenceNumbers.UNASSIGNED_SEQ_NO));
319+
.filter(v -> v != SequenceNumbersService.PRE_60_NODE_CHECKPOINT && v != SequenceNumbers.UNASSIGNED_SEQ_NO));
320320
return value.isPresent() ? value.getAsLong() : SequenceNumbers.UNASSIGNED_SEQ_NO;
321321
}
322322

0 commit comments

Comments
 (0)