vtctl ApplySchema supports '-request_context' flag#7777
Merged
shlomi-noach merged 1 commit intovitessio:masterfrom Apr 6, 2021
Merged
vtctl ApplySchema supports '-request_context' flag#7777shlomi-noach merged 1 commit intovitessio:masterfrom
shlomi-noach merged 1 commit intovitessio:masterfrom
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
UUIDas 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 ApplySchemacommand you may specify multiple DDLs; each has its own uniqueUUIDbut all share the same context.The context is useful to logically grouping migrations.
Until today,
vtctlwould 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
UUIDformat, preceded with an identity of the originator, as is the status today. Examples:vtgate:a8352418-8d55-11eb-815f-f875a4d24e90vtctl:fa4a2e13-8a46-11eb-85f5-f875a4d24e90At 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: