Expand description
Page 0: the superblock. Roots of every tree, and the format version.
Structs§
Constants§
- FORMAT_
VERSION - Version a newly created store is stamped with. The
compact-cellscargo feature still decides only this default; opening never restamps it. - MAX_
TREES - META_
PAGE - META_
PAGE_ B - 2f: the second commit slot. Generation g lives in page g % 2, so writing generation g+1 only ever overwrites the slot of g-1 – the newest published root is never touched by the write that supersedes it, and a torn slot write fails its page checksum and loses to the other slot. (LMDB’s dual meta page; its pick is by txnid, ours by generation, and unlike LMDB every slot is protected by the ordinary page checksum.)
- SUPPORTED_
FORMAT_ VERSION - Highest logical superblock version this engine reads. Versions 1 (plain cells) and 2 (compact cells) are both supported in every build. The page header’s own version (byte 4) guards the physical page layout; THIS guards the meaning of what the pages contain — key encodings, payload format, keyspace tags. A database stamped with a newer value is refused on open, never guessed at.