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: utilize jobs for long-running migrations #58183

Closed
ajwerner opened this issue Dec 22, 2020 · 4 comments · Fixed by #59760
Closed

migration: utilize jobs for long-running migrations #58183

ajwerner opened this issue Dec 22, 2020 · 4 comments · Fixed by #59760
Assignees

Comments

@ajwerner
Copy link
Contributor

Utilizing jobs for long-running migrations comes with benefits. Namely you can pause them. You get visibility into the fact that they are running. You also get other niceties that come with jobs like stats, the file to stop adoption, etc. This issue is a placeholder for work to update #57694 to utilize jobs for individual migrations.

@ajwerner ajwerner self-assigned this Dec 22, 2020
@blathers-crl
Copy link

blathers-crl bot commented Dec 22, 2020

Hi @ajwerner, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

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

@ajwerner
Copy link
Contributor Author

The work to do this is on irfansharif#2. It skewed with the branch from which I did the refactor.

@tbg
Copy link
Member

tbg commented Jan 5, 2021

What's the next step here?

@ajwerner
Copy link
Contributor Author

ajwerner commented Jan 5, 2021

Circling back on this, I'm going to deal with the skew on master and make a PR.

ajwerner added a commit to ajwerner/cockroach that referenced this issue Feb 3, 2021
This commit introduces a job to run long-running migration. This empowers
long-running migrations with leases, pausability, and cancelability.

Fixes cockroachdb#58183

Release note: None
ajwerner added a commit to ajwerner/cockroach that referenced this issue Feb 7, 2021
This commit introduces a job to run long-running migration. This empowers
long-running migrations with leases, pausability, and cancelability.

Fixes cockroachdb#58183

Release note: None
ajwerner added a commit to ajwerner/cockroach that referenced this issue Feb 9, 2021
This commit introduces a job to run long-running migration. This empowers
long-running migrations with leases, pausability, and cancelability.

Fixes cockroachdb#58183

Release note: None
ajwerner added a commit to ajwerner/cockroach that referenced this issue Feb 9, 2021
This commit introduces a job to run long-running migration. This empowers
long-running migrations with leases, pausability, and cancelability.

Fixes cockroachdb#58183

Release note: None
craig bot pushed a commit that referenced this issue Feb 10, 2021
59760: migration,jobs: refactor long-running migrations and hook up job r=ajwerner a=ajwerner

This PR comes in three commits. The first commit reworks the package structure of long-running migrations a bit. The second introduces a migration job. The third introduces a `system.migrations` table to store completion state for migrations. The idea is that running long-running migrations in a job is handy because it provides leasing, observability, and control to users. 

Fixes #58183.


Co-authored-by: Andrew Werner <[email protected]>
@craig craig bot closed this as completed in d710268 Feb 10, 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 a pull request may close this issue.

2 participants