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

release-19.2: sql,importccl: prevent DROP DATABASE CASCADE if there are offline tables #48612

Merged
merged 1 commit into from May 11, 2020

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented May 8, 2020

Backport 1/1 commits from #48596.

/cc @cockroachdb/release


See the issue for more commentary on the problem. In short, we never dropped
offline tables during DROP DATABASE ... CASCADE which would end up leaving
those tables completely orphaned. Orphaned tables with no parent are a problem.

Perhaps it would be better to stop the relevant jobs and then clean up after
them but that's a much more involved fix.

Fixes #48589.

Release note (bug fix): Prevent dropping of databases which contain tables
which are currently offline due to IMPORT or RESTORE. Previously dropping
a database in this state could lead to a corrupted schema which prevented
running backups.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@blathers-crl
Copy link

blathers-crl bot commented May 8, 2020

❌ The GitHub CI (Cockroach) build has failed on 6f375c59.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

… tables

See the issue for more commentary on the problem. In short, we never dropped
offline tables during `DROP DATABASE ... CASCADE` which would end up leaving
those tables completely orphaned. Orphaned tables with no parent are a problem.

Perhaps it would be better to stop the relevant jobs and then clean up after
them but that's a much more involved fix.

Fixes cockroachdb#48589.

Release note (bug fix): Prevent dropping of databases which contain tables
which are currently offline due to `IMPORT` or `RESTORE`. Previously dropping
a database in this state could lead to a corrupted schema which prevented
running backups.
@ajwerner
Copy link
Contributor Author

ugh I just pressed the button because I saw the green check and didn't realize it hadn't gotten a stamp until it was too late :(

Opening the revert I guess?

@dt
Copy link
Member

dt commented May 11, 2020

LGTM

@knz
Copy link
Contributor

knz commented May 12, 2020

LGTM, good backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants