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

backupccl: drop temp system database on failed restore #70380

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

adityamaru
Copy link
Contributor

Previously, if a restore failed during execution
we would not cleanup the temproary system db descriptor
that we create during a cluster restore. A
SHOW DATABASES after the failed restore would show
the crdb_temp_system database as well.

This change adds logic to drop the database in the
OnFailOrCancel hook of the retore job.

Fixes: #70324

Release note: None

@adityamaru adityamaru requested review from dt, msbutler and a team and removed request for a team September 17, 2021 22:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@adityamaru adityamaru force-pushed the drop-system-on-failed-restore branch from 363f2ff to 5191571 Compare September 19, 2021 12:23
Previously, if a restore failed during execution
we would not cleanup the temproary system db descriptor
that we create during a cluster restore. A
`SHOW DATABASES` after the failed restore would show
the `crdb_temp_system` database as well.

This change adds logic to drop the database in the
OnFailOrCancel hook of the retore job.

Fixes: cockroachdb#70324

Release note: None
@adityamaru adityamaru force-pushed the drop-system-on-failed-restore branch from 5191571 to 2b4c072 Compare September 19, 2021 16:24
@adityamaru
Copy link
Contributor Author

TFTR!

bors r=dt

@craig
Copy link
Contributor

craig bot commented Sep 21, 2021

🔒 Permission denied

Existing reviewers: click here to make adityamaru a reviewer

@irfansharif
Copy link
Contributor

Sorry to see you go Aditya, good luck on your next gig!

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 21, 2021

Build succeeded:

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.

backupccl: restore does not drop crdb_temp_system descriptor and namespace on failure
4 participants