-
Notifications
You must be signed in to change notification settings - Fork 4.1k
schema: cascade interacting with offline tables #84137
Copy link
Copy link
Closed
Labels
A-schema-changesC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
An offline table means nobody other than the job that moved it to or created it in the offline state is supposed to interact with it; doing so violates the assumptions that job makes about its exclusive interactions with that table, in particular safety of non-transactional and non-lease-holding interactions.
However currently it appears that DROP ... CASCADE is cascading to offline tables, violating this invariant.
To reproduce:
- Start a job that creates or moves a table into
OFFLINE. (e.g.RESTORE db.tbl) - While that job is running or paused, drop the database containing that table with cascade (
DROP DATABASE db CASCADE). - Observe that the job is still running but the table is now in DROP and its namespace entry has been removed.
Jira issue: CRDB-17485
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-changesC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)