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

migration,backupccl: deal with full cluster backup/restore and migration jobs #60307

Closed
ajwerner opened this issue Feb 10, 2021 · 3 comments
Closed
Labels
A-disaster-recovery C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. no-issue-activity T-disaster-recovery X-stale

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Feb 10, 2021

Describe the problem

In #59760 we introduce a job to run cluster version migrations. This is great because it offers many benefits of the jobs ecosystem like pausing and mutual exclusion. A downside is that a full cluster backup is going to pick up those jobs which may not be safe to resume on the restored cluster.

Possible Solution

I'm thinking a simple solution would be to encode the cluster id of the creating cluster into the job. Then, when the job is resumed on a different cluster, it can just error out.

Epic CRDB-8816

Jira issue: CRDB-3191

@ajwerner ajwerner added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Feb 10, 2021
@ajwerner
Copy link
Contributor Author

@dt should this be a GA blocker? I just realized this was missing triage labels :(

@dt
Copy link
Member

dt commented Mar 22, 2021

I don't think so. We won't restore a newer cluster version to an older cluster thanks to #61737 so it's just be restoring to an older one, and then it'd migrate up, which is probably what we want. Maybe some weirdness if there are system tables that are not restored so they're post-migration and then we run that migration again, but so far all migrations have had to make themselves idempotent anyway.

There's still the issue of non-cluster restore and bringing a non-migrated table into a migrated cluster, but we're no worse off than we were before 21.1 I believe in that we still expect authors of such migrations to fix it during restore.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-disaster-recovery C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. no-issue-activity T-disaster-recovery X-stale
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants