-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
message: account for duplicates across a recovered checkpoint boundary
Sequencer's runtime assertion checks were slightly too strong. A scenario we encountered which tripped a runtime panic was: - CONTINUE_TXN messages were read from a journal, and were then part of a checkpoint. The checkpoint included the producer's earlier last ACK clock and a begin offset at the first of these messages. - The messages were then duplicated within the journal, and ACKed. - A new Sequencer recovers from the checkpoint. - It reads the later, duplicated messages and adds them to the ring, followed by an ACK which begins a dequeue with a replay-read of the earlier messages. - The earlier messages are dequeued first, and then the replay ends and hands off to the ring. - Sequencer blows up because the first ring message is not strictly larger than the largest Clock dequeued from the replay read. The fix is simply to remove the runtime assertion, and discard duplicates, as this is valid thing that can happen. Also add a new test case covering this scenario.
- Loading branch information
1 parent
4818a4b
commit 719adef
Showing
2 changed files
with
60 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters