-
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
Support ALTER VITESS_MIGRATION ... CLEANUP statement #9160
Support ALTER VITESS_MIGRATION ... CLEANUP statement #9160
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
ready for review |
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.
Parser changes look good to me! 🏆
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.
Non-parser changes look good to me.
Minor suggestion on release notes, otherwise 👍
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 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
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
I resolved conflicts with |
Documentation PR: vitessio/website#886 |
Followup to #9158 (9158 is unmerged yet, this PR extends it)
Tracking: #6926
This PR offers a new statement:
alter vitess_migration '9748c3b7_7fdb_11eb_ac2c_f875a4d24e90' cleanup
Normally, when a migration is complete, it takes
24h
(or however-retain_online_ddl_tables
is configured) until the artifacts are garbage collected and removed.With this new SQL statement we can tell vitess that a migration's artifacts are good to garbage collect now. The statement itself does not clean the artifacts, and returns immediately. It merely sets a small (negative) value to
retain_artifacts_seconds
(see #9158) so that the next poll interval, typically a matter of seconds, can pick up on those artifacts and begin the garbage collection process.Notice that once a migration's artifacts are cleaned up, the migration may not be eligible for revert.
Checklist
Docs are required.