Skip to content

Replaying the MANIFEST produces the store’s file state. Each edit is applied in order.

  1. Remove the listed ids.
  2. Append the adds.
  3. replay_from = max(old, new).
  4. next_file = max(old, new).
  5. Replace the ranges if present.
  6. gc_floor = max(old, new).
  7. Replace the drops wholesale if present.

The first record of every MANIFEST is a full snapshot: adds are all files, plus replay_from, next_file, ranges if non-default, the GC floor if non-zero, and drops if any.

Field Meaning
level 0 is L0: files may overlap, newest id first. 1 and up are sorted and non-overlapping within the level. Values greater than or equal to max_levels clamp to the last level
size file size in bytes (needed for remote files)
entries, min_ts, max_ts, smallest, largest copies of footer and index facts used for planning without opening the file
location 0 local (<id>.stc), 1 remote (object plus <id>.stci)
global_ts if not 0, every entry of the file is read with this timestamp (ingested files)
format the per-file stamp: the minimum of the writer’s current format and every source file whose blocks were copied verbatim
replay_from WAL stream offset; records with end <= replay_from are already in data files
next_file lower bound for the next file id (open also uses max id + 1)