wescale
wescale copied to clipboard
[Feature Discussion] Support for Vertical Split
Background
Vertical Split is a valuable functionality for database management. It involves splitting a database into multiple components for improved scalability and performance.
A typical Vertical Split process involves the following steps:
- Identify the tables that need to be migrated.
- Perform data replication, ensuring that the source and target tables are synchronized.
- (Optional) Provide progress tracking for users.
- (Optional) Validate data consistency between the source and target.
- Switch read traffic to the target database.
- Switch write traffic to the target database.
- (Optional) Reverse the data synchronization direction, with data now being synchronized from the target to the source. This can be done for a period of time before stopping.
- Clean up the source database.
Proposal
The MoveTables command has already implemented much of the functionality described above. However, due to the Planner rewrite in WeScale, the "Switch Traffic" capability of MoveTables is no longer functional. We need to reimplement the "Switch Traffic" feature based on our current codebase.
Furthermore, it is crucial to approach the design of our vertical split capability from the perspective of WeScale. We should carefully consider how we can enhance and optimize the vertical split functionality we provide.
By addressing these points, we can improve our support for Vertical Split and ensure it aligns well with the WeScale system.