-
Notifications
You must be signed in to change notification settings - Fork 737
Support write conflicts for snapshot isolation in column shards #29598
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
Support write conflicts for snapshot isolation in column shards #29598
Conversation
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
🟢 |
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
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.
Pull request overview
This PR implements support for write conflict detection under snapshot isolation for column shards. The implementation threads a new LockMode parameter through the write pipeline to distinguish between optimistic and snapshot isolation modes, and adds a readOnlyConflicts flag to control whether scans should check for write conflicts.
- Threads
LockModeparameter from write requests through write tasks, writing context, and scan operations - Adds
IsSnapshotIsolated()method to identify snapshot isolation transactions - Implements
readOnlyConflictsflag to control conflict detection behavior in scans - Refactors batch builder logic to handle snapshot-isolated writes with conflict checking
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| write_queue.h/cpp | Adds LockMode field to TWriteTask and passes it to writing context |
| context.h | Adds LockMode field and IsSnapshotIsolated() method to TWritingContext |
| columnshard__write.cpp | Extracts LockMode from write request with OPTIMISTIC default |
| restore.h/cpp | Adds ReadOnlyConflicts flag to modification restore task |
| builder.cpp | Refactors logic with handleReplace lambda to support snapshot-isolated writes |
| tx_scan.cpp | Adds false parameter for readOnlyConflicts in external scans |
| tx_internal_scan.cpp | Passes ReadOnlyConflicts flag from request to scan setup |
| description.h | Implements conflict detection logic based on readOnlyConflicts flag |
| columnshard.h | Adds ReadOnlyConflicts field to TEvInternalScan |
| kqp_snapshot_isolation_ut.cpp | Adds comprehensive tests for different write operation types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
nikvas0
left a comment
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.
kqp ok
…platform#29598) Co-authored-by: Kirill Vasilenko <kir-vasilenko@ybd.tech>
Milestone 3 here #12972