Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves a deadlock scenario applying constraint
The scenario, which takes place on database instance applying constraint creation as an external transaction, looks like this: - Transaction T1 creates the constraint index and population P starts - Transaction T2 which activates the constraint starts applying and now has a read lock on the counts store - Check point triggers, wants to rotate counts store and so acquires its write lock. It will have to block, but doing so will also blocks further read lock requests - T2 moves on to activate the constraint. Doing so means first waiting for the index to come online - P moves on to flip after population, something which includes initializing some sample data in counts store for this index. Will block on the counts store read lock, completing the deadlock The solution in this commit breaks the deadlock by having T2 unlock its read lock on the counts store before activating the constraint, i.e. as soon as it notices that it is a schema transaction. Schema transactions will not update the counts store anyway.
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 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