AevumDB file format 1
All integer fields outside JSON are unsigned big-endian values.
Header
Section titled “Header”Every database starts with exactly eight bytes:
AEVUM01\nRecord sequence
Section titled “Record sequence”The header is followed by zero or more records:
| Bytes | Meaning |
|---|---|
| 4 | JSON payload length N |
| 4 | IEEE CRC32 of the payload |
| N | UTF-8 JSON commit payload |
The maximum payload size is 256 MiB.
A payload has this logical shape:
{ "revision": 42, "unix_nano": 1770000000000000000, "operations": [ { "key": "feature/search", "value": "ZW5hYmxlZA==", "expires_at_unix_nano": 1770000030000000000 }, { "key": "legacy/flag", "deleted": true } ]}Go’s JSON encoding represents []byte values as base64 strings. Revisions start at 1 and must be contiguous. Keys may occur at most once in a commit. A tombstone has deleted: true, no value, and no expiration.
Recovery
Section titled “Recovery”An incomplete record header or payload is considered a crash tail and is truncated to the end of the preceding valid record. Invalid lengths, checksum mismatches, malformed JSON, non-contiguous revisions, duplicate keys, and invalid tombstones are reported as corruption.