Skip to content

store

store #

How trees move through the store, and what keeps them there.

A value is built in a workspace, sealed into objects/, held by pins while a process uses it, and evicted when nothing holds it and the budget is tight.

  • [.workspace][] — Workspace, a directory under live/<owner>/ that lasts as long as it is held, and the log a tool writes at its root.
  • [.seal][] — seal_tree / seal_call move a workspace tree into objects/ under its own hash; lookup_call finds a call's results.
  • [.memo][] — what the store has for one call key: its sealed results, the calls computing it, or nothing. The memo model is stated there.
  • [.pinned][] — Pinned, one process's hold on a sealed object.
  • [.hold][] — Hold, the object one name holds, pinned while the hold lives.
  • [.key_lock][] — KeyLock, an exclusive flock on one key; a miss is claimed under one so a call's body runs once however many callers arrive.
  • [.state_lock][] — StateLock, exclusive access to one state key: read its current version or seal and repoint a new one.
  • [.liveness][] — which processes are alive, by the flock each one holds.
  • [.eviction][] — keeping the store under budget, least valuable bytes first.