Expand description
HOP data pool: in-memory index backed by sharded on-disk storage.
§On-disk layout
The pool root contains two subdirectories, blobs/ and meta/, each
sharded into 256 subdirectories named 00–ff after the first byte of the
content hash. An entry with hash H is stored as:
blobs/<H[0:2]>/<H>.blob— raw payload bytesmeta/<H[0:2]>/<H>.meta— SCALE-encodedHopEntryMeta
§Recovery
On startup the pool scans every meta/ shard, decodes each .meta file,
and rebuilds the in-memory index. .meta files that are corrupt, have an
unexpected version, or lack a sibling .blob are deleted. Then the
corresponding blobs/ shard is scanned and any .blob without an entry in
the freshly-built index (orphan) is also deleted. Stale .tmp.* files left
by a previous crash are removed during both scans.
Structs§
- HopData
Pool - HOP data pool with disk-backed blob storage and in-memory metadata index.