Test Cassandra bypass-current concurrency fences - #12011
Draft
taylan-oai wants to merge 1 commit into
Draft
taylan-oai wants to merge 1 commit into
taylan-oai wants to merge 1 commit into
Conversation
|
|
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
Document and test the existing Cassandra bypass-current safeguards so changes to current-run promotion preserve execution-version and shard-ownership checks.
Problem
Cassandra checks that a run is not current before submitting its mutable-state batch. Existing tests cover current-record conflicts and execution-version conflicts separately, but do not exercise a current-run transition between this read and the batch. The relationship between this precheck, History's execution lock, and the conditional writes is also undocumented.
Approach
Add deterministic Cassandra integration tests that execute a competing persistence operation after the bypass-current read and before the conditional batch. Cover both update and conflict resolution:
Read back complete mutable state and the current run after each operation. Document the History execution-lock and shard-fencing assumptions beside the precheck.
Validation
Risks, rollout, and scope
Runtime behavior and schema are unchanged. The positive database-version argument does not apply to legacy executions with
DBRecordVersion == 0when the next event ID is unchanged; those executions rely on History's per-run lock and shard fencing. These tests do not establish safety for arbitrary direct database writes or callers that bypass those ownership rules.