Skip to main content

Crate mmdb

Crate mmdb 

Source
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§

BidiIterator
A bidirectional iterator over (user_key, value) pairs.
BlockCache
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.
BlockCachePool
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 BlockCache view, not here. Construct once, wrap in an Arc, and hand a attached view to each DB (via DbOptions::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.
ReadOptions
Options for read operations.
Snapshot
RAII snapshot guard. Automatically releases the snapshot when dropped.
WriteBatch
A write batch groups multiple mutations to be applied atomically.
WriteBatchWithIndex
A WriteBatch with a secondary sorted index for efficient iteration. Allows iterating over batch contents merged with a DB snapshot.
WriteOptions
Options for write operations.

Enums§

CompactionFilterDecision
Decision returned by a compaction filter.
CompressionType
Compression type for a block.
ErrorKind
Classifies an Error for 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§

BlockPropertyCollector
Collects properties from key-value pairs during SST building. One instance per property type per SST file build.
BlockPropertyFilter
Filters data blocks based on collected properties during iteration.
CompactionFilter
Trait for custom compaction filters.
ResultExt
Extension trait adding trace frames to Result values as they propagate.

Type Aliases§

Result
Result type used throughout MMDB.
SequenceNumber
Global monotonically increasing sequence number.
SkipPointFn
Callback that returns true for user keys that should be skipped during iteration.