Skip to content

Add --move-tables mode - #1755

Draft
ericyan wants to merge 23 commits into
masterfrom
feature/move-tables
Draft

Add --move-tables mode#1755
ericyan wants to merge 23 commits into
masterfrom
feature/move-tables

Conversation

@ericyan

@ericyan ericyan commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for a new move table mode, in which one or more tables are copied from a source MySQL cluster to a target MySQL cluster.

Related issue: #1681

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Component PRs

Most of the PRs for this feature were created before Stacked PR were available. In addition to the PR stack, this feature branch also consolidates the following move-tables PRs:

Core migration flow

  • #1702 Add CLI parameters for move-tables
  • #1703 Applier logic and range-bounded copy support
  • #1705 Overall move-tables migration flow
  • #1710 Create and validate target tables
  • #1712 Configuration initialization fixes
  • #1718 Source-primary connections for primary-only operations
  • #1726 Coordinated multi-table migration
  • #1746 Support generated, JSON, unsigned, and typed-column handling in move-tables

Cutover and recovery

  • #1704 Cooperative cutover orchestration
  • #1708 Crash-safe resume
  • #1720 Restore drain GTID on resume
  • #1723 Cutover and recovery integration coverage

Throttling, hooks, and cleanup

  • #1709 Target-credential throttling
  • #1711 Move-tables hook environment variables
  • #1713 Enable throttling in move-tables mode
  • #1717 Post-migration cleanup
  • #1721 Move-tables lag measurement

Integration coverage and follow-up

  • #1714 Single-table integration test support
  • #1754 Drop target tables in noop mode

danieljoos and others added 23 commits August 18, 2026 13:49
Add move-table command parsing and validate the table list input.
Initialize migration context from the CLI configuration.

Refs: #1702
Build range-bounded copy queries and prepare target-table DML queries.
Apply copy batches through the applier and invoke them from the migrator.

Refs: #1703
Enable end-to-end target-table copying, route DML events to the target, and harden move-table initialization and table selection.

Refs: #1705

Co-authored-by: Chris Kirkland <chriskirkland@github.com>
Co-authored-by: Daniel Joos <danieljoos@github.com>
Co-authored-by: womoruyi <womoruyi@github.com>
Implement the T0-T6 cooperative cutover workflow and cover atomic target-table cutover behavior.

Refs: #1704

Co-authored-by: Zach Sierakowski <zacharysierakowski@github.com>
Create target tables in the destination database and abort safely when target tables already exist.

Refs: #1710
Use target-cluster credentials and replica status for control-replica throttling during move-table migrations.

Refs: #1709
Expose move-table source, target, and migration details to lifecycle hooks.

Refs: #1711
Initialize move-table configuration consistently before migration setup.

Refs: #1712
Enable the throttler in move-table mode with the move-table-specific configuration.

Refs: #1713
Persist per-table checkpoints and drain GTIDs so copying and cutover can resume safely after interruption.

Refs: #1708
Remove target artifacts and migration state after successful or failed move-table operations.

Refs: #1717
Add local integration scenarios for single-table copying and concurrent writes.

Refs: #1714
Restore the move-table drain GTID when resuming an interrupted migration.

Refs: #1720
Introduce source-primary connection configuration and guard primary-required move-table operations.

Refs: #1718
Update status reporting and lag measurement for move-table migrations.

Refs: #1721
Add failpoint-driven integration coverage for copy, drain, hook, and cutover recovery.

Refs: #1723
Extend migration state, copying, checkpointing, draining, and atomic rename to ordered sets of tables.

Refs: #1726
Exclude generated columns from move-tables writable column lists during
initial setup and resume. Use the filtered columns for row-copy queries
while preserving the complete column layout for binlog event ordinals.
Populate writable column metadata for fresh and resumed move-table
migrations so JSON, unsigned, and binary values are encoded correctly.
Exercise row copy and concurrent DML with signed, unsigned, and maximum
BIGINT UNSIGNED values.
@ericyan
ericyan force-pushed the feature/move-tables branch from 5acafd2 to f830fe0 Compare August 18, 2026 15:36
@ericyan ericyan added feature-move-tables PRs that are associated with the new move-tables feature feature labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature feature-move-tables PRs that are associated with the new move-tables feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants