Skip to main content

Module migration_executor

Module migration_executor 

Source
Expand description

vShard migration executor — drives the 3-phase migration state machine.

Phase 1 (Base Copy): Add target node to source Raft group as learner. Raft replication handles data transfer (AppendEntries with committed log entries).

Phase 2 (WAL Catch-Up): Monitor target’s replication lag. When the target’s commit_index is within threshold of the leader’s, catch-up is ready.

Phase 3 (Atomic Cut-Over): Propose a routing table update through Raft. Once committed on all replicas, the vShard is atomically owned by the target group. Create ghost stubs on the source for transparent scatter-gather.

Structs§

MigrationExecutor
Executes a vShard migration through the 3-phase protocol.
MigrationRequest
Configuration for a vShard migration.
MigrationResult
Result of a completed migration.
MigrationSnapshot
Observability snapshot of a migration.
MigrationTracker
Track active migrations across the cluster.