pub fn migrate(options: MigrationOptions) -> MigrationResult<MigrationReport>Expand description
Copy an offline format v1 or v2 store into a new format v3 store.
The source is opened read-only and remains unchanged. Migration resolves the newest record generation for each key with TTL filtering disabled, then preserves each winning record’s timestamp and absolute TTL expiry exactly. Consequently, an expired newest generation remains the winner and an older value cannot reappear when the migrated store is opened with TTL enabled.
Data is written to a sibling temporary file, flushed, reopened, and compared record-for-record before it is published at the destination without overwriting an existing path. Verification proves that the logical copy matches recovery; legacy v1/v2 data has no v3 record checksums, so it cannot prove that the source itself was uncorrupted.
No process may write the source or manipulate the destination paths during this operation. The implementation performs best-effort identity and metadata checks, not cooperative locking.