Conversation
The coordinator TTL only drops an exclusive hold. A fenced sink rejects a stale write after it observes a newer token, and an unfenced sink still accepts that write. Co-authored-by: Nicholas <n.ampazis@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a small, stdlib-only teaching demo under
lease_vs_fencing/. It is isolated from the scanner driver: no scanner files are changed, and the demo does not joinmake check.The demo makes two mechanisms concrete:
FencedSinkrejects a token older than one it has already observed.UnfencedSinkstores every write.The shared timeline expires Alice's lease, grants Bob a newer token, and then lets Alice write again. The fenced sink rejects that stale write. The unfenced sink stores it. A separate case writes after the TTL with no newer token presented, and the fenced sink still accepts it, so expiry is not treated as a fence.
How to run
From the repository root: