integrity
integrity
#
Verifying the store: dropping every object whose files no longer hash to its name.
- Hash each object outside the index. The stat cache re-reads only the files whose stat changed since they were hashed, which a file truncated by a power loss or rewritten in place always has.
- In one index transaction, unindex each object that fails (its row, every name pointing at it, every pin on it) and move its directory into a live workspace; after the commit, delete that workspace.
A call whose result was dropped computes again; a state whose current version was dropped starts again from its seed.
verify(scratch)
#
Drop every object in scratch whose tree no longer hashes to its name.
Returns:
| Type | Description |
|---|---|
list[ContentHash]
|
The hashes of the objects dropped. |