Expand description
Optional staged links engine: concurrency, immutable history, and a
replaceable commit log. See docs/ENGINE-STRATEGIES.md for costs and limits.
Unlike the legacy undo decorator, no underlying mapped data is modified while a transaction is open. A checksummed logical revision is flushed before it becomes visible. The log is the authoritative storage.
Modules§
- cluster
- Optional optimistic coordination across namespaced shards. A coordinator must provide atomic snapshots/CAS; local workspaces are never shared state.
- maintenance
- Optional bounded namespace maintenance; ordinary atomic stores need not implement it.
- paged
- Optional SQL-free shadow pages for the ordered log, independent of logical revision and replication strategies. See docs/protocol/native-pages.md.
- partitioned
- Immutable journal objects on independent data stores; only small pointers participate in the catalog’s atomic transaction. Never mutate/delete objects.
- raft
- A draft Raft replica that keeps the journals of an
AtomicJournalStore. - reclaiming
- Explicit epoch-fenced reclamation for separately owned immutable namespaces.
- recovery
- Check and repair a damaged engine journal.
Engine::openrefuses a journal with any bad record; these functions apply the same rules to report the longest prefix that still replays, and to rebuild a journal from it or from an intact copy. Seedocs/ENGINE-RECOVERY.mdfor what each step can and cannot get back. - replication
- Fixed-primary log synchronization. Replica acknowledgements are copies, not consensus: no elections, automatic failover, or cross-shard atomicity.
Structs§
- Background
Compaction - Calls
compact_journal_aftereveryperiodon its own thread. Each pass that compacts holds the commit lock while the journal is replaced, so commits wait for it. The first failure ends the worker andstopreturns it; a failed replacement also fences the engine until reopen, as with a manual compaction. Dropping the handle stops the worker and discards any failure. - Branch
- Delta
Log - Single-span delta encoding with at most interval-1 consecutive deltas. Compress complete snapshots; logical change records pass through unchanged. Inner resources/fencing remain caller-owned. Mutation errors require reopen.
- Engine
- Share clones of this handle across threads. All writes must use its sessions; opening multiple independent writers on the same log is not supported.
- Engine
Options - Engine
Transaction - An isolated write set with the same raw LinksStorage API as other backends. Dropping or rolling back discards the write set; allocation may leave gaps.
- Memory
Log - Row
- Savepoint
- Names one position in the write set of the session that created it.
- Snapshot
- Immutable revision, safe to keep after history retention or transaction end.
- Timed
Log - Keeps
revision|unix millisecondsin a second log for every record appended toinner. Records and their format are unchanged, so an engine or a backup never needs to know this decorator exists, and the cost is one more append and flush.
Enums§
- Concurrency
Control - Constraint
- Constraint
Validation - Constraint maintenance, independent of concurrency and serializable reads.
- Group
Commit Outcome - One independent session’s result, in the caller’s input order.
- History
Policy - Isolation
Level - Revision
Encoding - Logical journal payload, independent of the physical log’s encoding.
- Serializable
Validation - State
Structure - In-memory revision representation, independent of durability and isolation.
Functions§
- restore_
backup - Copy an archived journal to an empty log, stopping at one revision, and return
the revision the copy ends at.
Nonecopies the whole archive. Opening the destination gives the engine as it was at that revision, on a new timeline. - revision_
at - The latest revision written by
time, forrestore_backup. Refuses a time before the first timestamp, because the state then is not known.