Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: drop table does not block early enough against declarative schema changer #99379

Closed
fqazi opened this issue Mar 23, 2023 · 0 comments · Fixed by #99438
Closed

sql: drop table does not block early enough against declarative schema changer #99379

fqazi opened this issue Mar 23, 2023 · 0 comments · Fixed by #99438
Assignees
Labels
branch-master Failures and bugs on the master branch. branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@fqazi
Copy link
Collaborator

fqazi commented Mar 23, 2023

Currently, the code to block drops inside the legacy schema changer when an ongoing declarative schema
change is happing is too deep inside. This can lead to scenarios where legacy schema changes can encounter
errors instead of returning properly errors.

Jira issue: CRDB-25853

@fqazi fqazi added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. branch-master Failures and bugs on the master branch. T-sql-schema-deprecated Use T-sql-foundations instead branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 labels Mar 23, 2023
@fqazi fqazi self-assigned this Mar 23, 2023
craig bot pushed a commit that referenced this issue Mar 24, 2023
99438: sql/schemachanger: block legacy schema changer operations earlier r=fqazi a=fqazi

Previously, it was possible for ADD/DROP CONSTRAINT and other declarative schema changer operations to collide with DROP TABLE in the legacy schema changer, since our gate was not early enough. So, some work would be done before the schema change was blocked with a retry error.
This patch prevents DROP TABLE/VIEW/SEQUENCE from executing until a declarative schema change on such objects is completed earlier.

Fixes: #99379

Release note: None

99468: c2c: add acceptance test r=stevendanna,renatolabs a=msbutler

c2c: add acceptance test

This patch adds a lightweight acceptance test that calls the main c2c roachtest
driver. This will add a c2c roachtest to Essential CI, preventing future
patches from inadvertently breaking the C2C roachtest driver.

Fixes #99230

Release note: None

Co-authored-by: Faizan Qazi <[email protected]>
Co-authored-by: Michael Butler <[email protected]>
@craig craig bot closed this as completed in 0440cb1 Mar 24, 2023
blathers-crl bot pushed a commit that referenced this issue Mar 27, 2023
Previously, it was possible for ADD/DROP CONSTRAINT and
other declarative schema changer operations to collide with
DROP TABLE in the legacy schema changer, since our gate
was not early enough. So, some work would be done before
the schema change was blocked with a retry error.
This patch prevents DROP TABLE/VIEW/SEQUENCE from
executing until a declarative schema change on such
objects is completed earlier.

Fixes: #99379

Release note: None
@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant