Expand description
Append-only file for recording mutations.
Each shard writes its own AOF file (shard-{id}.aof). Records are
written after successful mutations. The binary format uses a simple
tag + payload + CRC32 structure for each record.
File layout:
[EAOF magic: 4B][version: 1B]
[record]*Record layout:
[tag: 1B][payload...][crc32: 4B]The CRC32 covers the tag + payload bytes.
Structs§
- AofReader
- Reader for iterating over AOF records.
- AofWriter
- Buffered writer for appending AOF records to a file.
Enums§
- AofRecord
- A single mutation record stored in the AOF.
- Fsync
Policy - Configurable fsync policy for the AOF writer.
Functions§
- aof_
path - Returns the AOF file path for a given shard in a data directory.