Skip to content

move-tables: ensure target tables are dropped in noop mode - #1754

Merged
ericyan merged 1 commit into
feature/move-tablesfrom
move-table-noop
Aug 18, 2026
Merged

move-tables: ensure target tables are dropped in noop mode#1754
ericyan merged 1 commit into
feature/move-tablesfrom
move-table-noop

Conversation

@ericyan

@ericyan ericyan commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR ensure the --noop in move-table mode is genuinely side-effect free with respect to the target tables it
creates for validation.

In move-tables mode, a --noop (dry-run) run creates the target tables purely to validate their schema — no data is moved and no cutover happens. However, moveTablesFinalCleanup() only performed cleanup inside the --ok-to-drop-table branch, which is scoped to source-side artifacts (the __del rollback handle and the checkpoint table). As a result, the schema-validation target tables were left behind on the target whenever --ok-to-drop-table was not set, leaking tables from what is supposed to be a side-effect-free dry run.

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.

Copilot AI balanced review requested due to automatic review settings August 18, 2026 12:33

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.

Pull request overview

Ensures move-tables noop runs clean up temporary target tables used for schema validation.

Changes:

  • Drops validation tables during noop cleanup.
  • Adds an integration test covering target-table removal.
Show a summary per file
File Description
go/logic/migrator.go Adds noop target-table cleanup.
go/logic/migrator_test.go Tests cleanup of multiple target tables.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread go/logic/migrator.go
Comment thread go/logic/migrator.go
@ericyan
ericyan merged commit 5acafd2 into feature/move-tables Aug 18, 2026
9 checks passed
@ericyan ericyan mentioned this pull request Aug 19, 2026
2 tasks
@ericyan ericyan added the feature-move-tables PRs that are associated with the new move-tables feature label Aug 19, 2026
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