-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Deterministic clustered dedupe (#6415)
Issue description: - Publish a message with a `Nats-Msg-Id`. - Leader election through restarts/networking/etc. - Due to leader election the proposal queue is drained and the message is not stored/proposed. - Any retries of the original message will fail until the de-dupe window clears the original message, even though it was not stored in the stream. This issue is due to staging a zero sequence in the de-dupe map. An easy solution seems to clear all zero sequence entries from the de-dupe map upon stepping down, but that has correctness issues if any of those messages did get proposed. This PR removes the staging of a zero sequence and ensures all replicas can deterministically do de-duping themselves. And duplicate messages are only blocked at the cluster-level if we know what the sequence is. Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
- Loading branch information
1 parent
71c9886
commit 861081f
Showing
3 changed files
with
151 additions
and
45 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
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