pub const CHECKPOINT_FILE_MAGIC: u32 = 0x0000DEAD;
Expand description
Checkpoints and summaries are persisted as blob files. Files are committed to local store
by duration or file size. Committed files are synced with the remote store continuously. Files are
optionally compressed with the zstd compression format. Filenames follow the format
<checkpoint_seq_num>.checkpoint_seq_num
is the first checkpoint present in that
file. MANIFEST is the index and source of truth for all files present in the archive.
State Archival Directory Layout
- archive/
- MANIFEST
- epoch_0/
- 0.chk
- 0.sum
- 1000.chk
- 1000.sum
- 3000.chk
- 3000.sum
- …
- 100000.chk
- 100000.sum
- epoch_1/
- 101000.chk
- …
Blob File Disk Format
┌──────────────────────────────┐
│ magic <4 byte> │
├──────────────────────────────┤
│ storage format <1 byte> │
│ file compression <1 byte> │
│ ┌──────────────────────────┐ │
│ │ Blob 1 │ │
│ ├──────────────────────────┤ │
│ │ … │ │
│ ├──────────────────────────┤ │
│ │ Blob N │ │
│ └──────────────────────────┘ │
└──────────────────────────────┘
Blob
┌───────────────┬───────────────────┬──────────────┐
│ len
MANIFEST File Disk Format ┌──────────────────────────────┐ │ magic<4 byte> │ ├──────────────────────────────┤ │ serialized manifest │ ├──────────────────────────────┤ │ sha3 <32 bytes> │ └──────────────────────────────┘