Skip to content

Instantly share code, notes, and snippets.

@dmusicant-dk
Created June 13, 2023 21:23
Show Gist options
  • Save dmusicant-dk/50824a0549b05ffa5e55ec23661b8e27 to your computer and use it in GitHub Desktop.
Save dmusicant-dk/50824a0549b05ffa5e55ec23661b8e27 to your computer and use it in GitHub Desktop.

Extra Credit

Why do you think even with compaction, you can get duplicates?

Click to view the answer...
There are two key aspects to compaction that allow for duplicates:
  1. The cleanup policy compact guarantees only that at least one message for each key will be available
  2. Compaction is run periodically. So there will be times when it has not run but multiple versions of a message of the same key might be produced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment