Expand description
Automatic v1 → v2 DAG migration.
When a database directory contains log.aof (v1 format), this module
reads all valid ops, converts them to v2 Node objects, writes them to
the object store, rebuilds indexes, and renames log.aof → log.aof.v1.bak.
The migration is:
- Transparent: zero user action required
- Idempotent: if it crashes mid-way, log.aof is still present → retries
- Non-destructive: log.aof.v1.bak is always kept as a rollback path
- Self-repairing: corrupt AOF lines are skipped (partial writes from BrokenPipe)
- Parallel: object writes use Rayon thread pool
Functions§
- migrate_
if_ needed - Run the full v1 → v2 migration for one database directory.