-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lock: track isolation level information in lock modes
This adds tracking for isolation level information of the associated transaction in lock modes. This is only done for non-locking reads and exclusive lcoks. We then use this to modify the conflict resolution rules between non-locking reads and exclusive locks. The new conflict resolution rules are as follows: - If either the non-locking read or the exclusive lock belongs to a a transaction that can tolerate write-skew (read committed or snapshot), the non-locking read does not block on the exclusive lock. - If both the non-locking read and exclusive lock belong to serializable transactions and the non-locking read is doing so at a timestamp below the exclusive lock, it does not block. - Otherwise, the blocking behavior is dictated by the `ExclusiveLocksBlockNonLockingReads` cluster setting. This patch also improves how testing for the Conflicts function is organized. This was motivated by the increased surface area that needed testing now that we're pushing isolation levels into some lock modes. Note that lock modes are yet to be hooked up to the concurrency control package, and as such, the patch itself doesn't resolve the linked issue. Informs #94729 Release note: None
- Loading branch information
1 parent
b97ca19
commit 9f29898
Showing
4 changed files
with
412 additions
and
323 deletions.
There are no files selected for viewing
This file contains 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 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 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.