-
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
Online DDL: introducing ddl_strategy -singleton-context
flag
#7946
Online DDL: introducing ddl_strategy -singleton-context
flag
#7946
Conversation
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]>
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]>
tests added and looking good. |
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
go/vt/vttablet/onlineddl/executor.go
Outdated
case onlineDDL.StrategySetting().IsSingleton(): | ||
// We will reject this migration if there's any pending migration | ||
if len(pendingUUIDs) > 0 { | ||
return result, fmt.Errorf("singleton migration rejected: found pending migrations [%s]", strings.Join(pendingUUIDs, ", ")) |
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.
vterrors
should be used, right?
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.
Right 😛
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
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.
LGTM
Signed-off-by: Shlomi Noach <[email protected]>
Description
Followup to #7785
This PR introduces
ddl_strategy
now supports-singleton-context
flag.-singleton
rejects a migration if there's any other pending migration-singleton-context
rejects a migration is there's any other pending migration that has a different migration context.With
-singleton-context
, it is possible to submit multiple migrations which all share the same migration context. For example, the following is allowed:The above submits three migrations. All three will be accepted. For comparison, running the above with
-singleton
would accept the first migration (drop table if exists t1
) and reject the other two.Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: