Skip to main content

Module migration

Module migration 

Source
Expand description

Dual-stack migration protocol.

Migration steps:

  1. Allocate new representation alongside old.
  2. Initialize new from a snapshot of old.
  3. Bump generation, swap strategy tag - both representations now live.
  4. Wait for old generation’s in-flight count to drain to zero.
  5. Drop old representation.

The MigrationGuard enforces steps 3-5 in scope.

Structs§

Generation
Wraps the current generation captured at op entry.
MigrationGuard
Guard for the migration coordinator. Wraps the migrate-then-drain sequence: begin bumps the generation and swaps the tag, wait_quiescent drains the old generation. The drain is explicit - the guard does NOT drain on drop.