-
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.
120780: sql/catalog: address session based leasing bugs r=fqazi a=fqazi This patch addresses the following issues: 1. Previously the session based leasing upgrade had a race condition against the leasing count queries, which could cause them to incorrect expect the wrong version of the descriptor. To address this, we are going to start using the system database descriptor version to determine if synthetic descriptors should be used (instead of cluster settings). 2. The repair_schema logictest had an intermittent failure because it was force deleting and injecting descriptors instantly. This runs into an existing design limitation of the lease manager where deleted descriptors are instantly cleaned up from memory, but asynchronously removed from storage. When we inject the descriptor with the exact same versions, the lease manager would detect a duplicate row and fails renewing (in the session based model). This condition can only be hit by repair queries and in the expiry based model would lead to duplicate rows. For the purpose of testing we are going to intentionally give a new version when adding the descriptor back, since the sequence in general dangerous with repair queries (i.e. e need to confirm that the lease is no longer in use before injecting the descriptor again or set a new version). Fixes: #120445 Fixes #120735 Fixes #120675 Co-authored-by: Faizan Qazi <[email protected]>
- Loading branch information
Showing
8 changed files
with
60 additions
and
19 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
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
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