Module transactions
Expand description
Transactions with reversible writes and optional durable recovery.
The store’s callbacks run after mutation. A journal of callbacks alone therefore cannot recover a crash between mutation and callback. This layer persists a complete before snapshot at begin and an after snapshot at commit, as well as every callback transition. Recovery restores the last committed snapshot, or the before snapshot of an interrupted transaction.
Snapshots use O(number of links) space per begin/commit and grow the journal; restore uses O(number of links + highest address) store operations, plus sorting and backend index costs. There is no isolation from readers outside the exclusively owned store, no nesting, and no asynchronous commit. Recovery assumes the underlying store remains structurally readable; repairing torn tree-index writes requires support from the storage backend itself.
Put validation/cascade policies around the transaction handle, with a raw store underneath this layer. This records all policy writes and lets recovery restore arbitrary addresses without validation rejecting intermediate states.
Structs§
- File
Transition Log - A versioned, checksummed append-only file journal.
- Memory
Transition Log - An in-memory journal for transactions that do not require crash recovery.
- Transaction
- An exclusively borrowed transaction; unfinished handles roll back on drop.
- Transactions
Decorator - Adds transactions to any raw [
Doublets] store. - Transition
- A reversible mutation, including both link states.
Enums§
- Journal
Entry - A durable recovery record.
- Transition
Kind - The mutation represented by a
Transition.
Traits§
- Transition
Log - Storage for ordered transaction records.