Skip to main content

Module reset

Module reset 

Source
Expand description

Namespace / collection reset (spec §3.7, gonzalo#203).

Reset tombstones every live record under a prefix by issuing ordinary OCC-guarded delete calls, so it replicates like any other delete and needs only write on the namespace. It is not atomic: no substrate offers multi-key transactions. It is idempotent instead. A second run tombstones whatever the first run missed (a key that lost a race) and skips everything already gone.

Structs§

ResetReport
What a reset run did.

Functions§

reset
Tombstone every live record under prefix. prefix.namespace is required. Resetting every namespace in a store is not a reset, so a caller who wants that must loop over namespaces explicitly.
reset_as
As reset, stamping author as each tombstone’s deleter (Store::delete_as). None keeps each record’s own author, exactly as reset does. Over a daemon the deleter follows spec §3.6: a non-admin token is stamped as itself.