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

cherrypick-1.1: sqlccl: cleanup failed or canceled RESTORE data #19653

Merged
merged 1 commit into from
Oct 31, 2017
Merged

cherrypick-1.1: sqlccl: cleanup failed or canceled RESTORE data #19653

merged 1 commit into from
Oct 31, 2017

Conversation

maddyblue
Copy link
Contributor

Previously, if a RESTORE failed or was manually canceled, any data
it had committed would have been orphaned, and forever taken up
space. Since there was no table descriptor, nothing would have been
able to see or delete it.

Add optional callbacks in jobs code to allow for specific jobs
to implement an onFail method. Add the job's client.Txn to the
update method and this onFail callback to allow for a job to be
transactionally failed and cleaned up.

Release note: Cleanup partially restored data when a RESTORE fails
or is canceled.

This PR is from #19578 but with all of the settings passing removed,
since 1.1 doesn't have any cluster settings for backup/restore.

Fixes #19398
Fixes #17123

@maddyblue maddyblue requested review from benesch and a team October 30, 2017 20:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, if a RESTORE failed or was manually canceled, any data
it had committed would have been orphaned, and forever taken up
space. Since there was no table descriptor, nothing would have been
able to see or delete it.

Add optional callbacks in jobs code to allow for specific jobs
to implement an onFail method. Add the job's client.Txn to the
update method and this onFail callback to allow for a job to be
transactionally failed and cleaned up.

Release note: Cleanup partially restored data when a RESTORE fails
or is canceled.

This PR is from #19578 but with all of the settings passing removed,
since 1.1 doesn't have any cluster settings for backup/restore.

Fixes #19398
Fixes #17123
@bdarnell
Copy link
Contributor

:lgtm:


Review status: 0 of 3 files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@maddyblue maddyblue merged commit 2a53751 into cockroachdb:release-1.1 Oct 31, 2017
@maddyblue maddyblue deleted the cherrypick-19578 branch October 31, 2017 16:51
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.

3 participants