-
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
vtctl ApplySchema accepts 'ALTER VITESS_MIGRATION...' statements #9303
Changes from 2 commits
306d387
d316636
cc86d88
1c73419
49e4eed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -249,13 +249,9 @@ func (exec *TabletExecutor) executeSQL(ctx context.Context, sql string, execResu | |
return err | ||
} | ||
for _, onlineDDL := range onlineDDLs { | ||
if exec.ddlStrategySetting.IsSkipTopo() { | ||
exec.executeOnAllTablets(ctx, execResult, onlineDDL.SQL, true) | ||
if len(execResult.SuccessShards) > 0 { | ||
exec.wr.Logger().Printf("%s\n", onlineDDL.UUID) | ||
} | ||
} else { | ||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change here is to remove And of course the |
||
} | ||
} | ||
return nil | ||
|
@@ -267,15 +263,13 @@ func (exec *TabletExecutor) executeSQL(ctx context.Context, sql string, execResu | |
execResult.ExecutorErr = err.Error() | ||
return err | ||
} | ||
if exec.ddlStrategySetting.IsSkipTopo() { | ||
exec.executeOnAllTablets(ctx, execResult, onlineDDL.SQL, true) | ||
exec.wr.Logger().Printf("%s\n", onlineDDL.UUID) | ||
} else { | ||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change here is to remove And of course the |
||
return nil | ||
case *sqlparser.AlterMigration: | ||
exec.executeOnAllTablets(ctx, execResult, sql, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the actual change in this PR: direct |
||
return nil | ||
} | ||
exec.wr.Logger().Infof("Received DDL request. strategy=%+v", schema.DDLStrategyDirect) | ||
exec.executeOnAllTablets(ctx, execResult, sql, false) | ||
return nil | ||
} | ||
|
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.
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.
Suggestion to keep this consistent with other release notes.