vtctl ApplySchema accepts 'ALTER VITESS_MIGRATION...' statements#9303
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>
| exec.executeOnlineDDL(ctx, execResult, onlineDDL) | ||
| exec.executeOnAllTablets(ctx, execResult, onlineDDL.SQL, true) | ||
| if len(execResult.SuccessShards) > 0 { | ||
| exec.wr.Logger().Printf("%s\n", onlineDDL.UUID) |
There was a problem hiding this comment.
The change here is to remove if exec.ddlStrategySetting.IsSkipTopo() { -- we've already hard coded that as true is previous releases.
And of course the else code cannot ever happen, so that's also removed.
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
| exec.executeOnlineDDL(ctx, execResult, onlineDDL) | ||
| } | ||
| exec.executeOnAllTablets(ctx, execResult, onlineDDL.SQL, true) | ||
| exec.wr.Logger().Printf("%s\n", onlineDDL.UUID) |
There was a problem hiding this comment.
The change here is to remove if exec.ddlStrategySetting.IsSkipTopo() { -- we've already hard coded that as true is previous releases.
And of course the else code cannot ever happen, so that's also removed.
| exec.wr.Logger().Printf("%s\n", onlineDDL.UUID) | ||
| return nil | ||
| case *sqlparser.AlterMigration: | ||
| exec.executeOnAllTablets(ctx, execResult, sql, true) |
There was a problem hiding this comment.
Here is the actual change in this PR: direct AlterMigration statements to the tablets via QueryService (that's what the last true argument indicates).
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
Code commits of this PR were already merged by another PR. All that is left in this PR is release notes. |
deepthi
left a comment
There was a problem hiding this comment.
Can be merged after making the requested change + resolve conflicts.
doc/releasenotes/13_0_0_summary.md
Outdated
| - 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 scheduler's discretion. there is no guarantee that they will be scheduled to run immediately. | ||
|
|
||
| ### vtctl ApplySchema: ALTER VITESS_MIGRATION |
There was a problem hiding this comment.
| ### vtctl ApplySchema: ALTER VITESS_MIGRATION | |
| ### vtctl/vtctlclient ApplySchema: ALTER VITESS_MIGRATION |
There was a problem hiding this comment.
Suggestion to keep this consistent with other release notes.
|
Since the only remaining changes are to the release notes file, I suggest doing either a "squash-merge" or a rebase before merge so that there is only one commit. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
squash-merged. |
Description
The following is now supported:
$ vtctlclient ApplySchema -sql "alter vitess_migration 'dce5f77e_51de_11ec_a049_0a43f95f28a3' cancel" commerceApplySchemanow accepts all variants ofALTER VITESS_MIGRATION....Why are we doing this?
We long since wanted to deprecate VExec for OnlineDDL. Right now
vtctl OnlineDDL <command>heavily relies on wrangler/VExec to get the command to the underlying tablets. However,ApplySchemaalready has the required logic to get in to theQueryService. We will reimplementvtctl OnlineDDLon top ofApplySchemainstead ofVExec.This PR is a first step towards that re-implementation.
Related Issue(s)
Checklist