-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
OnlineDDL: implementing -postpone-completion, ALTER VITESS_MIGRATION ... COMPLETE #9171
OnlineDDL: implementing -postpone-completion, ALTER VITESS_MIGRATION ... COMPLETE #9171
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
…f cut-over for 'online' migrations until value is cleared. ALTER VITESS_MIGRATION ... COMPLETE now implemented and clears the flag. tests added. Signed-off-by: Shlomi Noach <[email protected]>
…etion>0 Signed-off-by: Shlomi Noach <[email protected]>
… has postpone_completion Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…eue posponed migrations. New test fails in th emeantime Signed-off-by: Shlomi Noach <[email protected]>
…ction fields while queued Signed-off-by: Shlomi Noach <[email protected]>
…anity check at end of switch Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have a lot of context on OnlineDDL, but the changes look good to me. We should wait for someone with more context to review this too :)
Signed-off-by: Shlomi Noach <[email protected]>
Noting that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of documentation nits, otherwise LGTM.
It's a pleasure to review a PR that is more tests than code 💯
doc/releasenotes/13_0_0_summary.md
Outdated
```sql | ||
alter vitess_migration '9748c3b7_7fdb_11eb_ac2c_f875a4d24e90' cleanup | ||
``` | ||
This query tells Vitess that a migration's artifacts are good to be cleaned up asap. This allows Vitess to free disk resources sooner. As a reminder, once a migration's artifacts are cleaned up, the migration is no | ||
|
||
This query tells Vitess that a migration's artifacts are good to be cleaned up asap. This allows Vitess to free disk resources sooner. As reminder, once a migration's artifacts are cleaned up, the migration is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This query tells Vitess that a migration's artifacts are good to be cleaned up asap. This allows Vitess to free disk resources sooner. As reminder, once a migration's artifacts are cleaned up, the migration is no | |
This query tells Vitess that a migration's artifacts are good to be cleaned up asap. This allows Vitess to free disk resources sooner. As a reminder, once a migration's artifacts are cleaned up, the migration is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
doc/releasenotes/13_0_0_summary.md
Outdated
|
||
- For running `ALTER`s (`online` and `gh-ost`) which are ready to cut-over: cut-over imminently (though not immediately - cut-over depends on polling interval, replication lag, etc) | ||
- For running `ALTER`s (`online` and `gh-ost`) which are only partly through the migration: they will cut-over automatically when they complete their work, as if `-postpone-completion` wasn't indicated | ||
- For queued `CREATE` and `DROP` migrations: "unblock" them from being scheduled. They'll be scheduled at the schedulers discretion. there is no guarantee that they will be scheduled to run immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For queued `CREATE` and `DROP` migrations: "unblock" them from being scheduled. They'll be scheduled at the schedulers discretion. there is no guarantee that they will be scheduled to run immediately. | |
- For queued `CREATE` and `DROP` migrations: "unblock" them from being scheduled. They'll be scheduled at the scheduler's discretion. there is no guarantee that they will be scheduled to run immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: Shlomi Noach <[email protected]>
Dcoumentation PR: vitessio/website#887 |
This PR implements:
-postpone-completion
-postpone-completion
flag inddl_strategy
. This flag indicates that the migration should not auto-complete. This applies for:CREATE TABLE
DROP TABLE
ALTER
table inonline
strategyALTER
table ingh-ost
strategyNote that this flag is not supported for
pt-osc
strategy.Behavior of migrations with this flag:
ALTER
table begins, runs, but does not cut-over.CREATE
orDROP
migrations are silently not even scheduledComplimenting this flag is:
ALTER VITESS_MIGRATION '-uuid-' COMPLETE
This command indicates that a migration executed with
-postpone-completion
is good to complete. Behavior:ALTER
s (online
andgh-ost
) which are ready to cut-over: cut-over imminently (though not immediately - cut-over depends on polling interval, replication lag, etc)ALTER
s (online
andgh-ost
) which are only partly through the migration: they will cut-over automatically when they complete their work, as if-postpone-completion
wasn't indicatedCREATE
andDROP
migrations: "unblock" them from being scheduled. They'll be scheduled at the schedulers discretion. there is no guarantee that they will be scheduled to run immediately.tests added:
vrepl
endtoendgh-ost
endtoendThis PR extends #9160 (not yet merged at this time)
Tracking issue: #6926