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§
- address_
allocator - Selected permanent ranges over one linearizable atomic journal key. A grant is never recycled; author lineage fencing remains caller-owned.
- author_
fence - Explicit author takeover. Every guarded data CAS includes the fence key.
- causal
- Selected causal semantics. No I/O, owner fencing or replication.
- causal_
batch - Selected bounded local batches; remote leaves do not retain group atomicity.
- causal_
merkle - Selected bounded content snapshots and proof-checked causal transfer.
- causal_
named - Checked named/query facade over the sealed u64 workspace. The wider query marker can never equal a stored identity or reference.
- causal_
projection - Selected owned projection. Visibility never discards causal evidence.
- causal_
replica - Selected bounded local causal ownership; no global atomicity claim.
- causal_
session - Ordinary owned links/names staging with explicit-token local publication.
- cluster
- Optional optimistic coordination across namespaced shards. A coordinator must provide atomic snapshots/CAS; local workspaces are never shared state.
- etcd
- HTTP(S) etcd JSON gateway adapter. Requires a trusted durable etcd deployment. One atomic Txn reads all selected keys; writes compare modification revisions.
- lsm
- Selected physical LSM components. WAL semantics perform no storage I/O; replay alone does not validate the physical tables selected by a manifest.
- 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.
- sqlite
- Optional SQLite page-WAL component at the ordered revision-log boundary. A dedicated connection belongs to this log. Drop rolls pending records back. SQLite writer locking does not coordinate independent cached engine states; stale-tail/component errors fence this owner until it is dropped and reopened.
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.