Expand description
WAL reader for crash recovery and replay.
Reads records sequentially from a WAL file, validating checksums and magic numbers. Stops at the first corruption point — everything before that point is the committed prefix.
§Replay invariants
- Replay is deterministic: the same WAL file always produces the same sequence of records.
- Replay is idempotent: replaying the same record twice has the same effect as replaying it once.
- Unknown optional record types (bit 15 clear) are skipped.
- Unknown required record types (bit 15 set) cause a replay failure.
Structs§
- WalReader
- Sequential WAL reader.
- WalRecord
Iter - Iterator over WAL records.