OnlineDDL: Add cut-over-threshold flag to ApplySchema client command #17061
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
There are two different ways to execute OnlineDDL or "online schema migrations" in Vitess:
vtctlidclient
with theApplySchema
vtgate
Those two methods produce the exact same results within Vitess. There are a number of additional flags that you can specify as part of the
ddl_strategy
however: https://vitess.io/docs/user-guides/schema-changes/ddl-strategy-flags/A key flag that you can specify as part of the
ddl_strategy
value is--cut-over-threshold
, which limits the time we can spend cutting over a single migration before giving up and retrying again later. The primary thing that this limits within that goal is how long we wait for the replication being used for the migration (from the old table to the new) to catch up. If you are experiencing replication lag for any number of reasons, you may need to increase this value. You can do so via the SQL method today this way:There is, however, no way to affect that with the
vtctldclient
method today. That's what this PR adds.Related Issue(s)
Checklist