Skip to content

Bulk-load sort runs live in <root>/load-tmp/ (see Store layout). They are temporary.

Every block of a bulk-load run in load-tmp/ is sealed on its own. Its AAD is the 8-byte tag "loadrun1" ‖ file id u64 LE ‖ block index u64 LE, 24 bytes. The run is not a file with a footer: its block offsets and lengths are kept in memory by the loader.

Index builds spill to <root>/idxbuild-tmp/, a sibling of data/. Each block is u32 LE len ‖ sealed block with the AAD "idxrun01" ‖ file id u64 LE ‖ block index u64 LE (24 bytes). A run ends with the marker 0xFFFFFFFF (u32 LE) and a 48-byte sealed footer whose plaintext is the block count u64 LE and the entry count u64 LE, sealed with the same AAD form and block index u64::MAX. A reader rejects a run in three cases (SPEC V160):

  • EOF without a footer,
  • a count mismatch,
  • trailing bytes.