You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support gh-ost checkpointing and revertible migrations #21187
Bytebase retains the original _del table in bbdataarchive, but without a checkpoint and revert execution path it cannot use gh-ost to replay post-cutover binlog events into that table before restoring it.
Please support revertible gh-ost migrations as a Bytebase-managed workflow.
For the original migration, Bytebase would:
Allow or internally enable gh-ost checkpointing.
Prefer GTID checkpoints when the MySQL instance supports GTID.
Retain the _ghk checkpoint table and _del original table.
Record their exact names and the original cutover position in the Bytebase
task/change history.
Expose whether a completed migration is currently eligible for revert.
For a revert, Bytebase would:
Create a new reviewed and auditable task rather than removing or rewriting
the original migration history.
Verify that the _del and _ghk tables still exist.
Verify that the required binlogs are still available.
Invoke gh-ost using its native --revert and --old-table mode.
Show catch-up and cutover progress in the rollout.
Preserve the displaced post-migration table until verification is complete.
Clearly report when the reverse schema cannot accept post-cutover writes.
If this is intentionally unsupported, it would be helpful to document the reason and Bytebase's recommended rollback procedure for a completed gh-ost schema migration.
Additional context
Environment:
Bytebase: 3.20.1
MySQL: 8.0.46
Bytebase deployment: local Docker Compose
Online migration directive: -- gh-ost = {...}
Current behavior is understandable because Bytebase uses an explicit flag
allowlist and embeds gh-ost as a Go library rather than passing arbitrary CLI
arguments. However, merely preserving the _del table is not equivalent to
native gh-ost revert: a simple table swap does not replay writes made after the
original cutover.
The desired behavior is specifically gh-ost's synchronized revert, not generic
Questions for the Bytebase team:
Is the absence of gh-ost checkpoint/revert support intentional, or has it
simply not been implemented yet?
What recovery procedure does Bytebase currently recommend after a completed
gh-ost migration, especially when writes occurred after cutover?
If this is not an intentional limitation, would Bytebase accept a proposal
or contribution for a managed gh-ost revert workflow?
Activity