Skip to content

Feature Request: ALTER VITESS_MIGRATION … CONTEXT 'ctx': extend context-scoped control to all bulk migration operations #20177

@shlomi-noach

Description

@shlomi-noach

Feature Description

PR #20146 introduced ALTER VITESS_MIGRATION CANCEL CONTEXT 'ctx', which lets operators cancel all migrations that share a given migration context without disturbing unrelated migrations running concurrently.

The same scoped control is useful for every other bulk ALTER VITESS_MIGRATION operation. Without it, operators must either act on individual UUIDs or use the global "ALL" form, which affects every pending migration on the tablet regardless of context.

Request

Add a CONTEXT 'ctx' variant for each of the remaining bulk operations:

New syntax Effect
ALTER VITESS_MIGRATION CLEANUP CONTEXT 'ctx' Clean up artifacts only for migrations in this context
ALTER VITESS_MIGRATION COMPLETE CONTEXT 'ctx' Complete (lift postpone_completion) for this context
ALTER VITESS_MIGRATION POSTPONE COMPLETE CONTEXT 'ctx' Set postpone_completion for this context
ALTER VITESS_MIGRATION FORCE_CUTOVER CONTEXT 'ctx' Force cutover for running migrations in this context
ALTER VITESS_MIGRATION LAUNCH CONTEXT 'ctx' Launch queued migrations in this context
ALTER VITESS_MIGRATION THROTTLE CONTEXT 'ctx' [EXPIRE …] [RATIO …] Throttle migrations in this context
ALTER VITESS_MIGRATION UNTHROTTLE CONTEXT 'ctx' Unthrottle migrations in this context

An empty context string should be rejected at parse time.

Use Case(s)

When multiple teams or automation pipelines submit migrations concurrently with distinct @@migration_context values, operators need fine-grained, context-scoped control so that a maintenance action on one batch cannot accidentally affect another.

Metadata

Metadata

Assignees

Labels

Component: Online DDLOnline DDL (vitess/native/gh-ost/pt-osc)Type: EnhancementLogical improvement (somewhere between a bug and feature)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions