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-20.2: backupccl: idempotently restore system tables in cluster restore #61217

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

pbardea
Copy link
Contributor

@pbardea pbardea commented Feb 27, 2021

Backport 1/1 commits from #60458.

/cc @cockroachdb/release


Previously, if a cluster restore were to restart (e.g. in the case of
the coordinator crashing) after restoring the system tables, but before
completing, the job would attempt to restore the system table data again
and potentially fail on non-idempotent system table restoration
functions (e.g. restoring jobs).

This commit, adds a new SystemTablesRestored field to the restore
details to keep track of each system table that it has restored and
maintains progress. This is required, since not all system tables may
need to be restored atomically in the future.

Release note (bug fix): Fix a bug where cluster restore would sometimes
(very rarely) fail after retrying.

Release justification: bug fix

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pbardea pbardea self-assigned this Mar 22, 2021
Previously, if a cluster restore were to restart (e.g. in the case of
the coordinator crashing) after restoring the system tables, but before
completing, the job would attempt to restore the system table data again
and potentially fail on non-idempotent system table restoration
functions (e.g. restoring jobs).

This commit, adds a new SystemTablesRestored field to the restore
details to keep track of each system table that it has restored and
maintains progress. This is required, since not all system tables may
need to be restored atomically in the future.

Release note (bug fix): Fix a bug where cluster restore would sometimes
(very rarely) fail after retrying.
@pbardea pbardea marked this pull request as ready for review March 22, 2021 22:09
@pbardea pbardea requested review from a team, adityamaru and dt and removed request for a team March 22, 2021 22:09
@pbardea pbardea merged commit 0345d86 into cockroachdb:release-20.2 Mar 23, 2021
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

3 participants