CommandChanges.shouldCleanup short-circuits to NO if there is no data…#4873
CommandChanges.shouldCleanup short-circuits to NO if there is no data…#4873belliottsmith wants to merge 15 commits into
Conversation
|
+1 |
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent Accord journal cleanup/expunge decisions from being surfaced as NotDefined on the load path (which the PR description notes can cause linearizability violations). The visible changes in this repo primarily add/adjust tests and test utilities to reproduce and guard the behavior.
Changes:
- Add a new regression unit test (
AccordExpungeTest) coveringCleanup.EXPUNGEinteractions withCommandChangesreconstruction andjournal.loadCommand. - Extend
AccordGenerators.commandsBuilder()with an overload to allow customTxnIdgeneration (used by the new test). - Adjust distributed burn-test behavior and minor test cleanup/comment removals.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/unit/org/apache/cassandra/utils/AccordGenerators.java |
Adds an overload to build commands with a caller-supplied TxnId generator. |
test/unit/org/apache/cassandra/service/accord/AccordExpungeTest.java |
New regression test exercising EXPUNGE → loadCommand behavior across journal states. |
test/distributed/org/apache/cassandra/service/accord/journal/AccordJournalBurnTest.java |
Sets a global burn-test tuning parameter (CMD_BASE_CHECK_CHANCE) via static initializer. |
test/distributed/org/apache/cassandra/service/accord/AccordJournalCompactionTest.java |
Minor whitespace-only change. |
test/distributed/org/apache/cassandra/distributed/test/accord/AccordLoadTest.java |
Removes commented-out config lines. |
.gitmodules |
Points the modules/accord submodule at a personal fork/branch instead of the canonical Apache repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f021f32 to
00714e8
Compare
…, but this is incorrect as Cleanup.EXPUNGE may have dropped the data and the record must receive cleanup EXPUNGE and be reported as ERASED. This can lead to lienarizability violations.
…s where the ownership is unknown
- Ensure ReadCoordinator callbacks are invoked on owning thread
… tryExecuteListening terminates
… as soon as we have data
fec9c89 to
f2b5980
Compare
| { | ||
| if (cell.column().isSimple()) | ||
| return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); | ||
| return new BTreeRow(clustering, primaryKeyLivenessInfo, Deletion.LIVE, BTree.singleton(cell), minDeletionTime(cell)); |
There was a problem hiding this comment.
Do we want to do
long minDeletionTime = Math.min(minDeletionTime(primaryKeyLivenessInfo), minDeletionTime(deletion.time()));
as we do in create above here too?
| Future<?> future = toFuture(AsyncResults.reduce(results, Reduce.toNull())); | ||
| long timeoutSeconds = getAccord().execute_waiting_on_start_timeout.toSeconds(); | ||
| if (timeoutSeconds <= 0) future.awaitUninterruptibly().rethrowIfFailed(); | ||
| else if (!future.awaitUninterruptibly(timeoutSeconds, SECONDS)) |
There was a problem hiding this comment.
I think we would throw here only on timeout, but not on failure; should we add future.isSuccess() too?
There was a problem hiding this comment.
Weird, I thought I already handled that. Thanks!
0c7d366 to
4f8436c
Compare
…, but this is incorrect as Cleanup.EXPUNGE may have dropped the data and the record must receive cleanup EXPUNGE and be reported as ERASED. This can lead to lienarizability violations.
Thanks for sending a pull request! Here are some tips if you're new here:
Commit messages should follow the following format:
The Cassandra Jira