Skip to content

data/ZONES caches zone-map seeds: for a key range and a column, the data files that take part and a per-file summary. It is a derived cache: sealed whole with AAD "stc-zone-seed", written through ZONES.tmp and renamed, and ignored and rebuilt when it fails to open or carries an unknown magic. The per-block statistics it relates to are described under Zone maps.

Field Encoding Meaning
magic ascii "stzones2", or "stzones1" for the older form with no held-value sets
nspecs u32 LE number of specs
spec, repeated see below one per spec

A spec:

Field Encoding Meaning
start u32 length, then bytes start of the key range
end u32 length, then bytes end of the key range
column u64 LE column
nfiles u32 LE number of file entries
file, repeated see below one per file

A file entry:

Field Encoding Meaning
id u64 LE file id
size u64 LE file size
entries u64 LE entry count of the file
shape flag u8 whether a shape follows
shape optional layout below

A file entry is validated against the file’s size and entry count before use. If either differs, the entry is not used.