Expand description
Dual-stack migration protocol.
Migration steps:
- Allocate new representation alongside old.
- Initialize new from a snapshot of old.
- Bump generation, swap strategy tag - both representations now live.
- Wait for old generation’s in-flight count to drain to zero.
- Drop old representation.
The MigrationGuard enforces steps 3-5 in scope.
Structs§
- Generation
- Wraps the current generation captured at op entry.
- Migration
Guard - Guard for the migration coordinator. Wraps the migrate-then-drain
sequence:
beginbumps the generation and swaps the tag,wait_quiescentdrains the old generation. The drain is explicit - the guard does NOT drain on drop.