Skip to content

Feature Request: query buffering, transaction termination, for "special plan" migrations such as INSTANT DDL #17944

Open
@shlomi-noach

Description

@shlomi-noach

Feature Description

vreplication based migrations enjoy a sophisticated cut-over mechanism, which among other things and based on configuration, supports:

  • Query buffering for the duration of the cut-over phase (up to a limit).
  • Forced termination of queries and transactions that are holding locks or metadatalocks on the table, just before cut-over.

We wish to extend the above two to "special plan" ALTER TABLE operations, which currently include:

  • INSTANT DDL (and when --prefer-instant-ddl strategy flag is specified)
  • Some partition rotation operations (create new range partition, drop old range partitions)

These "special plan" operations are technically just handed off to MySQL. Both buffering and forced termination of queries/transactions can help mitigate a scenario where the changes are stalled due to a high workload.

At this time the proposal is to issue a forced termination just once and immediate before running the migration. In the future we might look into terminating queries/transactions that are affecting the migration even while it is being stalled.

Use Case(s)

Schema changes under heavy workloads

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions