lib/blobstore/readme.md
Storage for variable-sized values, provided by the outer Blobstore type.
Operates in one of two modes, specified when creating a storage and selected automatically when opening one, based on the persisted config:
Gridstore variant): read-write storage with
in-place space reuse, backed by memory mapped files.Logstore variant): append-only storage for
serverless deployments, one atomic append per file per flush.Concepts shared by both modes:
Gridstore)| file | content |
|---|---|
config.json | storage config, "mode": "mutable" |
tracker.dat | header with mapping count + mapping slots, preallocated |
page_{n}.dat | value data, preallocated to the page size |
bitmask.dat | one bit per block: used or free |
gaps.dat | per-region free block gap summaries |
Logstore)Designed for serverless environments, which restrict IO: files can only be appended to, existing bytes can never be rewritten (preallocated zero padding cannot be filled in later), and IO is expensive so as few files as possible are used. All files are read and written through the configured universal IO backend.
None.| file | content |
|---|---|
config.json | storage config, "mode": "append_only" |
log_tracker.dat | mapping entries, exact length = count * 16 |
log_page_{n}.dat | value data, exact length = end of last value |