Online DDL: migration state transitions to 'cancelled' after CANCEL command#10900
Merged
shlomi-noach merged 7 commits intovitessio:mainfrom Aug 2, 2022
Merged
Conversation
…ommand Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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>
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>
dbussink
approved these changes
Aug 1, 2022
Merged
3 tasks
systay
pushed a commit
to planetscale/vitess
that referenced
this pull request
Aug 19, 2022
…ommand (vitessio#10900) (vitessio#906) * Online DDL: migration state transitions to 'cancelled' after CANCEL command Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allow 'cancelled' state in vrepl suite Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allow 'cancelled' state in vrepl suite Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * expect 'cancelled' state Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * expect 'cancelled' state Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * excessive check for error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * expect 'cancelled' state Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Up till now, when a user would run
ALTER VITESS_MIGRATION '...' CANCELorALTER VITESS_MIGRATION CANCEL ALL, an affected pending migration (whetherqueued,readyorrunning) would transition intofailedstate.This is largely because all
ALTERtools:pt-osc,gh-ostand even VReplication are "3rd party" executors, and not under direct control of the Online DDL scheduler. The scheduler sends these tools the "abort" signal, and they follow up by failing with error -- which then gets recorded asfailed.However, this is not what the user expects. Now, in this PR, if the migration was terminated by a
CANCELcommand, then the migration status transitions tocancelledinstead offailed.we add a
cancelled_timestampin_vt.schema_migrationstable, which indicates if/when a migration was cancelled. The value is cleared (set toNULL) uponRETRY.Related Issue(s)
Checklist
Deployment Notes