Repository navigation
fix(cassandra): fence concurrent DeleteTable with a lease #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LeeroyHannigan
wants to merge
14
commits into
fix/505-deleting-window-answers
Choose a base branch
from
fix/553-cassandra-concurrent-delete-table
base: fix/505-deleting-window-answers
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,067
−131
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
13a2940
fix(cassandra): fence concurrent DeleteTable with a lease (#553)
LeeroyHannigan 43435e7
Merge fix/505-deleting-window-answers into fix/553-cassandra-concurre…
LeeroyHannigan 77c8ae0
test(cassandra): drop the point-in-time recovery half of the DeleteTa…
LeeroyHannigan 68f3e1e
test(cassandra): build the lease tests' index input against the curre…
LeeroyHannigan 45f2a69
test(cassandra): read the data table and the row status through one h…
LeeroyHannigan 7318dbc
Merge fix/505-deleting-window-answers into fix/553-cassandra-concurre…
LeeroyHannigan 6fa581b
Merge fix/505-deleting-window-answers into fix/553-cassandra-concurre…
LeeroyHannigan 9340cb7
test: assert the message of the losing DeleteTable on PostgreSQL and …
LeeroyHannigan 1b0aebf
docs: describe the Cassandra DeleteTable claim and its lease
LeeroyHannigan c40ed59
Merge fix/505-deleting-window-answers into fix/553-cassandra-concurre…
LeeroyHannigan 66a3046
fix(cassandra): release the DeleteTable lease when the removal fails
LeeroyHannigan bba68ad
fix(cassandra): finish a DeleteTable whose request is dropped after i…
LeeroyHannigan f77e591
test(cassandra): pause a DeleteTable at its renewal while a sweep tak…
LeeroyHannigan 08b7356
docs: name the DeleteTable lease in the clock note, and fix the remov…
LeeroyHannigan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing tests dropping the index tables before deleting their metadata: with main's order restored, the two delete modules pass 10 of 10. A slow DeleteTable whose row a sweep takes over has no end-to-end test either: with the renewal check disabled, 1 of 10 fails, and with the renewal's deadline condition removed only the direct method test fails. A test-hooks test that pauses a call between its drops and its renewal would cover both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in f77e591 and 66a3046.
a_delete_whose_row_a_sweep_took_over_stops_at_its_renewalpauses a DeleteTable between its drops and its renewal, moves the deadline into the past, and lets a sweep take the row. It runs two cases. In the first, the call resumes after the sweep removed the table and the test created the name again and tagged it. In the second, the call resumes while the sweep holds the row, paused at its own renewal.With the renewal check disabled, the first case fails: the call runs the tag delete, and the newer table loses its tag. Without the deadline condition in the compare-and-set, the second case fails: the call's renewal applies, and the call deletes the row the sweep holds. The first case passes under that control. Once the sweep finishes, the table id condition of the renewal refuses the call by itself.
The pause cannot show the order in
delete_indexes_for_table, because the order only matters when a drop fails.a_delete_that_fails_after_its_claim_is_finished_by_the_next_sweepfails the first index table drop. With main's order restored it fails: the metadata is gone before the failed drop, and the sweep's pass leaves both index tables.