Skip to content

Report move-tables cleanup failures - #1806

Merged
ericyan merged 1 commit into
feature/move-tablesfrom
move-tables-cleanup-errors
Nov 12, 2026
Merged

ericyan merged 1 commit into
feature/move-tablesfrom
move-tables-cleanup-errors

Conversation

@ericyan

@ericyan ericyan commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return cleanup errors from fresh move-tables migrations and noop runs instead of reporting success, preserving the existing resumed-cutover behavior.
  • Warn that a failure hook can run after target writes may have been enabled; do not assume recovery is safe without inspecting state.
  • Cover fresh and resumed cutovers, noop cleanup, and CLI failure-hook dispatch with focused integration tests.

Validation

  • go test -race -v ./go/logic -run '^TestMoveTablesCleanupErrors$' -count=1
  • go test -short -v ./go/logic -run '^TestMoveTablesCleanupErrors$' -count=1 (skipped as intended)
  • golangci-lint run ./go/logic/...
  • Verified that the fresh real and noop regression tests fail against the pre-fix code.

Stacked on #1755. The separate completed-transaction frontier issue #1781 remains unresolved.

Copilot AI dynamic review requested due to automatic review settings November 10, 2026 09:10
@ericyan
ericyan added this pull request to stack #1807 November 10, 2026 09:12

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 integration test can block until timeout if MoveTables() returns before onBeforeCutOver runs, masking the underlying migration error.

1 open issue
What changed in this PR

This PR makes move-tables migrations report cleanup failures instead of success, while preserving existing resumed-cutover behavior.

Changes:

  • Return contextual cleanup errors for fresh real and noop migrations.
  • Add integration coverage for fresh, resumed, and noop cleanup failures, plus CLI failure-hook dispatch.
  • Document that failure hooks may run before startup or after target writes have been enabled.
File Description
go/​logic/​migrator.go Propagates fresh move-tables cleanup errors with mode-specific context.
go/​logic/​migrator_move_tables_cleanup_integration_test.go Tests cleanup error propagation, warnings, and CLI failure hooks.
doc/​hooks.md Clarifies failure-hook timing and cautions against blind rollback.

Review effort: Max (auto)

@ericyan
ericyan force-pushed the move-tables-cleanup-errors branch from 910a112 to c0f0d2b Compare November 10, 2026 10:17
Return cleanup failures for fresh moves and noop runs instead of reporting success. Preserve the existing failure-hook contract and distinguish incomplete cleanup from a completed cutover.

Cover cleanup failures after fresh and resumed cutovers, noop cleanup, and CLI failure-hook dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ericyan
ericyan force-pushed the move-tables-cleanup-errors branch from c0f0d2b to 7d5d90a Compare November 10, 2026 10:29
@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
danieljoos
danieljoos previously approved these changes Nov 12, 2026
@ericyan
ericyan merged commit dfb342a into master Nov 12, 2026
19 checks passed
@ericyan
ericyan dismissed danieljoos’s stale review November 12, 2026 13:14

The merge-base changed after approval.

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