Skip to content

Document --move-tables mode - #1809

Merged
ericyan merged 4 commits into
move-tables-mariadbfrom
move-tables-docs
Nov 12, 2026
Merged

ericyan merged 4 commits into
move-tables-mariadbfrom
move-tables-docs

Conversation

@ericyan

@ericyan ericyan commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds public documentation for --move-tables mode and cleans up internal design references in comments:

  • Adds the user guide (doc/move-tables.md) covering setup, read/write cut-over, cleanup, resume, and rollback.
  • Adds the desgin doc (doc/move-tables-design.md) covering architecture, the T0–T6 cut-over sequence, and correctness/failure boundaries.
  • Updates README.md, doc/command-line-flags.md, doc/hooks.md, doc/resume.md, doc/throttle.md, doc/understanding-output.md, and the sample hooks in resources/hooks-sample/.
  • Replaces private design links and internal task/section markers in comments with references to doc/move-tables-design.md.

Stacked on #1756.

Remove internal task numbers, section markers, and private design links from move-tables comments and point to doc/move-tables-design.md instead.
Log target host, database, tables, and drain GTID in the before-cut-over and success sample hooks when GH_OST_MOVE_TABLES is set.
@ericyan
ericyan force-pushed the move-tables-docs branch 2 times, most recently from 7ea2327 to 89a8fe3 Compare November 12, 2026 10:04
Add the move-tables operator guide and technical reference, and update the README, flag reference, hook docs, resume docs, throttling docs, and output docs.
@ericyan
ericyan added this pull request to stack #1807 November 12, 2026 11:16
@ericyan
ericyan marked this pull request as ready for review November 12, 2026 11:16
Copilot AI dynamic review requested due to automatic review settings November 12, 2026 11:16
@ericyan ericyan self-assigned this Nov 12, 2026
@ericyan ericyan added the feature/move-tables PRs that are associated with the new move-tables feature label Nov 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documentation omits resume data-completeness warnings, checkpoint-table cleanup steps, and accepted cut-over timeout ranges, risking skipped row changes and failed retries or cut-overs.

3 open issues
What changed in this PR

Documents --move-tables for cross-cluster migrations, covering MySQL/MariaDB setup, operator-managed traffic switching, and recovery.

Changes:

  • Adds user and design guides for copying, cut-over, cleanup, resume, and rollback.
  • Updates related documentation and sample hook logging for move-tables mode.
  • Cleans up internal references in code/test comments and a panic message without changing migration flow.
File Description
resources/​hooks-sample/​gh-ost-on-success-hook Logs moved tables, target details, and drain GTID.
resources/​hooks-sample/​gh-ost-on-before-cut-over-hook Logs move-tables source and target details.
README.md Links the new user and design guides.
localtests/​move-tables/​multiple-two/​create.sql Removes an internal section reference from a comment.
localtests/​move-tables/​multiple-three/​create.sql Removes an internal section reference from a comment.
go/​logic/​migrator.go Replaces internal references and clarifies lifecycle comments.
go/​logic/​migrator_move_tables_cutover_test.go Clarifies test comments and removes internal task references.
go/​logic/​hooks.go Removes an internal marker from a hook-variable comment.
go/​logic/​applier.go Updates design references and bookkeeping comments.
go/​logic/​applier_test.go Cleans up internal references in test comments.
go/​base/​context.go Removes an internal section marker from panic text.
doc/​understanding-output.md Explains per-table progress and writer lag.
doc/​throttle.md Documents target-side throttling and source-monitoring responsibilities.
doc/​resume.md Adds move-tables resume guidance and fixes shell continuations.
doc/​move-tables.md Adds the operational setup, cut-over, and recovery guide.
doc/​move-tables-design.md Describes architecture, cut-over phases, and correctness boundaries.
doc/​hooks.md Documents move-tables hook variables and recovery precautions.
doc/​command-line-flags.md Documents move-tables options and mode-specific flag behavior.

Review effort: Max (auto)

Comment thread doc/command-line-flags.md Resolved
Comment thread doc/move-tables.md Resolved
Comment thread doc/move-tables.md Resolved
- Document cut-over-lock-timeout-seconds ranges and the fallback to 3s
- Warn that --resume can skip part of a transaction (#1781)
- Include the checkpoint table when abandoning a move
@ericyan ericyan mentioned this pull request Nov 12, 2026
2 tasks
danieljoos
danieljoos previously approved these changes Nov 12, 2026
@ericyan
ericyan dismissed danieljoos’s stale review November 12, 2026 13:14

The merge-base changed after approval.

@ericyan
ericyan merged commit dfb342a into master Nov 12, 2026
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants