-
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.
90108: sqlinstance: simplify instance provider code r=andreimatei a=andreimatei Before this patch, the instance provider was seemingly protecting against different methods being called concurrently with or before Start(). This protection was not necessary, as Start() is run to completion before the provider is used by anyone else. Also, part of the protection was broken: a bunch of unrelated code chunks were guarded by a sync.Once and at least one instance (the error handling after p.Reader.Start()) was running clearly after a the Once was used by p.initAndWait() - and so it was erroneously never running. Also, the code was bizarre - initializing was executed in an async task, but the caller was immediately waiting for it. This patch removes all such protection, assuming that Start() runs before anything else. Release note: None Epic: None 90180: scbuildstmt: fallback for `ADD COLUMN NOT NULL UNIQUE` r=Xiang-Gu a=Xiang-Gu An issue (#90174) was recently discovered when we have concurrent `add column not null unique` and inserts. This PR fall backs to the old schema changer for `add column unique` and `add column not null unique`. Informs #90174 Release note: None Co-authored-by: Andrei Matei <andrei@cockroachlabs.com> Co-authored-by: Xiang Gu <xiang@cockroachlabs.com>
- Loading branch information
Showing
8 changed files
with
56 additions
and
121 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