Skip to content

Commit

Permalink
Filter pre-6.0 nodes for checkpoint invariants
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jasontedor committed Sep 18, 2017
1 parent 5dd476f commit 6f25163
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -316,7 +316,7 @@ private static long inSyncCheckpointStates(
.stream()
.filter(cps -> cps.inSync)
.mapToLong(function)
.filter(v -> v != SequenceNumbers.UNASSIGNED_SEQ_NO));
.filter(v -> v != SequenceNumbersService.PRE_60_NODE_CHECKPOINT && v != SequenceNumbers.UNASSIGNED_SEQ_NO));
return value.isPresent() ? value.getAsLong() : SequenceNumbers.UNASSIGNED_SEQ_NO;
}

Expand Down

0 comments on commit 6f25163

Please sign in to comment.