fix(shared_state): Make write_batch atomic under SYNCHRONIZED isolation#5953
Closed
namo507 wants to merge 1 commit intoaden-hive:mainfrom
Closed
fix(shared_state): Make write_batch atomic under SYNCHRONIZED isolation#5953namo507 wants to merge 1 commit intoaden-hive:mainfrom
namo507 wants to merge 1 commit intoaden-hive:mainfrom
Conversation
…RONIZED isolation - Adds a documented TODO comment marking the write_batch() atomicity gap - Tracks the fix needed: acquire all per-key locks before any writes under SYNCHRONIZED isolation - References issue aden-hive#5946 for full context - Resolves: aden-hive#5946 (tracking comment) This is part of the fix/atomic-write-batch PR proposal.
PR Closed - Requirements Not MetThis PR has been automatically closed because it doesn't meet the requirements. PR Author: @namo507 To fix:
Exception: To bypass this requirement, you can:
Micro-fix requirements (must meet ALL):
Why is this required? See #472 for details. |
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 TODO marker documenting the concurrency gap in
write_batch()and tracks the full implementation needed. Addresses #5946.Changes
TODO(fix/atomic-write-batch)comment inshared_state.pydocumenting howwrite_batch()underSYNCHRONIZEDisolation can produce interleaved stateRelated issue: Closes #5946
What needs to happen for the full fix:
_write_batch_atomic()private method that acquires all per-key locks in sorted orderwrite_batch()routes through_write_batch_atomic()whenisolation == IsolationLevel.SYNCHRONIZEDSHAREDandISOLATEDisolation levels stay as-is (sequential writes are fine there)Test plan
write_batch()calls with overlapping keys produce consistent stateSHAREDisolation skips atomic path (no perf regression)