Does Vitess DDL revert guarantee data consistency after completion?
0 reputation · 05 Mar 2023, 10:42 UTC
Vitess supports online schema migrations through declarative strategies that track state changes. While the system provides a REVERT command to apply inverse DDL, this process is a logical schema reversal rather than a point-in-time recovery.
The primary concern is whether the revert mechanism serves as a reliable rollback strategy once a migration has successfully cut over. Since a revert of an ADD COLUMN operation performs a DROP COLUMN, any data captured during the window between migration is permanently lost. Furthermore, the retention of artifact tables created during the table-swap phase is subject to garbage collection settings that limit manual recovery windows.
What are the constraints on retaining artifact tables to ensure a manual rollback if a revert is insufficient, and how does Vitess handle data consistency if a revert is triggered after concurrent writes have occurred on new schema elements?