Skip to main content

Module fs_store

Module fs_store 

Source
Expand description

FsActionStore — the persistent two-table cache (action records + CAS).

Layout under the store root:

format.json                      {"version": 2}
actions/<aa>/<key-hex>.json      ActionResult records (small)
cas/<algo>/<aa>/<hash-hex>.bin   SOMA1-encoded blobs (deduplicated)
pins/<name>                      GC roots: files containing an action key hex

Commit protocol (crash-safe by construction):

  1. blob written first (idempotent temp+fsync+rename — concurrent same-content writers race benignly),
  2. action record renamed into place last — the record is the commit point. A crash in between leaves an orphan blob, never a record pointing at missing required state.

Eviction deletes blobs only; records are retained so an evicted entry is recomputed and re-fills the same content address (Nectar: eviction degrades performance, never correctness).

Structs§

FsActionStore
The persistent two-table store: action records + CAS blobs. See the module docs for the layout and the crash-safe commit protocol.

Constants§

FORMAT_VERSION
On-disk layout version, recorded in format.json. A mismatched dir is refused with a pointer to soma cache purge-v1 — silently reading an old layout would corrupt it.