-
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.
38377: sql: fix double-adding FK backreferences when retrying r=lucy-zhang a=lucy-zhang Currently, `PublishMultiple()` on the lease manager, which updates multiple table descriptors in a single transaction as part of a schema change, updates each table descriptor independently of the others. There was a bug where if the call to `PublishMultiple()` to add FKs and backreferences was retried (e.g., if there was a crash after this step but before the finalization of the schema change), we would correctly avoid re-adding the reference to the table, but the backreferences would be incorrectly added a second time. This change updates the interface of `PublishMultiple()`: There's now a single update closure which has access to a map of all table descriptors being modified. Backreferences are now only installed if the forward reference was also installed. Release note: None 38382: sql: add support for NOT VALID check constraints r=Tyler314 a=Tyler314 Mark constraint as unvalidated if user specifies NOT VALID in their check constraint. Within backfill, do not add the unvalidated constraints to the queues for validating. Release note (sql change): Support NOT VALID for check constraints, which supports not checking constraints for existing rows. Co-authored-by: Lucy Zhang <[email protected]> Co-authored-by: Tyler314 <[email protected]>
- Loading branch information
Showing
7 changed files
with
240 additions
and
107 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
Oops, something went wrong.