Expand description
MMDB — the pure-Rust LSM-Tree storage engine behind vsdb.
A high-performance LSM-Tree storage engine in pure Rust.
The public API is the set of items re-exported from this crate root; internal modules (WAL, SST, manifest, compaction, cache, …) are implementation details and deliberately private.
Structs§
- Bidi
Iterator - A bidirectional iterator over (user_key, value) pairs.
- Block
Cache - One DB’s view of a
BlockCachePool: the same five-method surface the cache has always had, with every key transparently namespaced by this member’s id. - Block
Cache Pool - Shared storage for one or more DBs’ block caches: a single moka LRU
(capacity applies to the whole pool) and the sharded reverse index.
Pinned entries live on each member’s
BlockCacheview, not here. Construct once, wrap in anArc, and hand aattached view to each DB (viaDbOptions::block_cache); DBs given the same pool share capacity, DBs given none keep a private pool. The LRU is segmented, so a single unpinned block must fit the capacity share of its hashed segment; caches below 1 MiB use one segment, while pools of 64 MiB or more use 64. - DB
- The core database handle.
- DBIterator
- A database-level iterator that presents a clean view of key-value pairs.
- DbOptions
- Database-level options.
- Error
- The MMDB error type. See the module documentation for details.
- Read
Options - Options for read operations.
- Snapshot
- RAII snapshot guard. Automatically releases the snapshot when dropped.
- Write
Batch - A write batch groups multiple mutations to be applied atomically.
- Write
Batch With Index - A WriteBatch with a secondary sorted index for efficient iteration. Allows iterating over batch contents merged with a DB snapshot.
- Write
Options - Options for write operations.
Enums§
- Compaction
Filter Decision - Decision returned by a compaction filter.
- Compression
Type - Compression type for a block.
- Error
Kind - Classifies an
Errorfor programmatic handling.
Constants§
- MAX_
USER_ KEY_ SIZE - Maximum allowed user key length for writes (8 MiB).
- MAX_
WRITE_ ENTRY_ SIZE - Maximum allowed user key + value payload for a single write entry.
Traits§
- Block
Property Collector - Collects properties from key-value pairs during SST building. One instance per property type per SST file build.
- Block
Property Filter - Filters data blocks based on collected properties during iteration.
- Compaction
Filter - Trait for custom compaction filters.
- Result
Ext - Extension trait adding trace frames to
Resultvalues as they propagate.
Type Aliases§
- Result
- Result type used throughout MMDB.
- Sequence
Number - Global monotonically increasing sequence number.
- Skip
Point Fn - Callback that returns
truefor user keys that should be skipped during iteration.