seal
seal
#
Sealing: a workspace tree becomes an immutable object, named by its own hash.
seal_treehashes and measures a tree, renames it toobjects/<hash>(an equal tree already there wins and the copy is dropped) and write-protects it, all outside the index.- One index transaction then records the object, names it, and pins it, so no other process's eviction ever sees it unheld.
Looking a call up is the reverse, in one transaction: resolve its names, check every object is still on disk, and pin them.
lookup_call(scratch, key, count)
#
The call key's count results, pinned, or None unless every one is present.
Source code in capturegraph-lib/capturegraph/scratch/store/seal.py
seal_call(scratch, key, workspace, stems, compute_seconds)
#
Seal workspace/<stem> for each stem as the call key's results, in order.
Source code in capturegraph-lib/capturegraph/scratch/store/seal.py
seal_tree(scratch, source)
#
Move the tree at source into objects/ under its own hash, not yet indexed.
Returns:
| Type | Description |
|---|---|
tuple[ContentHash, int]
|
The object's hash and size in bytes, for the caller to |