vtctl ApplySchema supports '-request_context' flag #7777
Merged
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
An online DDL migration is associated with both a unique
UUID
as well as amigration_context
, aka the "context".The context is unique to the scope/origin of the request.
UUID
, but all share the same context which is the@@session_uuid
.vtctl ApplySchema
command you may specify multiple DDLs; each has its own uniqueUUID
but all share the same context.The context is useful to logically grouping migrations.
Until today,
vtctl
would auto-generate the migration context. This PR allows the user to optionally override that, and specify their own context. It is the user's responsibility to handle uniqueness of the context.The recommendation is to use a
UUID
format, preceded with an identity of the originator, as is the status today. Examples:vtgate:a8352418-8d55-11eb-815f-f875a4d24e90
vtctl:fa4a2e13-8a46-11eb-85f5-f875a4d24e90
At this time the migration context is strictly a logical tag, used to search/filter migrations. Supplying a non-unique context does not break the migrations in any way.
Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: