Skip to main content

Crate corium_store

Crate corium_store 

Source
Expand description

Content-addressed blob and fenced root stores for immutable index segments.

Enable the postgres, turso, or s3 Cargo feature to use [PostgresBlobStore], [TursoBlobStore], or [S3BlobStore], respectively.

Structs§

BlobId
A content identifier for immutable blobs.
DbRoot
Published durable index-root metadata carrying the write lease (see docs/design/log-and-transactor.md).
FsStore
Filesystem-backed content-addressed blob and fenced root store.
GcReport
Result counters from a mark-and-sweep garbage collection pass.
MemoryStore
In-memory blob and root store for tests and embedded use.
SegmentCache
Small read-through segment cache keyed by blob id.

Enums§

StoreError
Errors raised by store implementations.

Constants§

FORMAT_VERSION
Storage format written by this release.
INDEX_MANIFEST_MAGIC
First line of every index-manifest blob. A flat key-stream blob can never start with these bytes: its first eight bytes are a big-endian key length, and this text decodes to an impossible length.

Traits§

BlobStore
Immutable content-addressed blob storage.
RootStore
Named root pointer storage with compare-and-swap fencing.

Functions§

chunk_segment_keys
Splits a sorted key stream into encoded leaf chunks.
db_root_name
Root-store key for a database’s published index root.
decode_index_manifest
Decodes a manifest’s leaf-chunk ids in key order.
decode_segment_keys
Decodes one (u64 big-endian length, key)* chunk or flat segment blob back into its sorted key stream. Inverse of chunk_segment_keys’ per-chunk framing; a pre-format-3 flat snapshot is one such run.
digest
Computes the content id BlobStore::put would assign to bytes.
encode_index_manifest
Encodes a manifest naming children leaf chunks in key order.
index_blob_children
Returns the blob ids referenced by an index blob: a manifest’s children, or nothing for a flat (pre-format-3) key stream. Garbage collection and backup share this walk so reachability can never diverge between them.
is_index_manifest
Reports whether blob bytes are an index manifest (vs a flat key stream).
mark_and_sweep
Marks blobs reachable from live_roots and deletes every unmarked blob.
mark_and_sweep_retained
Marks reachable blobs and deletes only unreachable blobs older than retention relative to now.
meta_root_name
Root-store key for a database’s durable schema and naming metadata.

Type Aliases§

BlobIdStream
Asynchronous stream of blob identifiers produced by BlobStore::list.