v0.9.0 — Beta
Pre-releaselsm-db v0.9.0 — Beta
Concurrency under load, and the numbers locked. v0.9.0 is the beta in the run
to 1.0. The engine is feature-complete, hardened, and API-frozen; this release
broadens testing to a multi-threaded soak and freezes the benchmark baselines for
the 1.0 line. No behaviour or API change.
What is lsm-db?
A log-structured merge-tree storage engine for Rust — the write path that powers
RocksDB, LevelDB, Cassandra, and ScyllaDB, packaged as a small, audited library.
It is the storage layer the portfolio's database crates (txn-db, Hive DB) build
on, so the durability and read/write contract is implemented and tested once.
What's new in 0.9.0
A multi-threaded soak
tests/concurrency_soak.rs runs six writer threads and three reader threads over
one shared engine while background compaction churns throughout. Each writer owns
a disjoint slice of the key space and follows a deterministic put-then-delete
pattern, so the final live set is exactly computable. The readers scan
continuously and must observe only strictly-ascending, duplicate-free results —
never a torn merge across the moving run set. When the writers finish, a full scan
must equal the exact union of what every writer left behind, and survive a reopen.
Under --all-features it runs with the write-ahead log and bloom filters active.
This complements the loom model of the read-versus-compaction swap (which proves
the protocol exhaustively for a small interleaving) with a large, real, threaded
workload.
Benchmark baselines locked
docs/PERFORMANCE.md now records its numbers as the locked baselines for the
1.0 line, confirmed at this beta. The hot paths are unchanged since the block
cache landed in 0.6, and a regression beyond 5% on any tracked metric blocks a
release. Representative single-threaded hot-path numbers (Windows x86_64,
release):
| Operation | time |
|---|---|
get hit (from a run) |
~180 ns |
get miss (from a run) |
~97 ns |
put into the memtable |
~160 ns |
| full scan, 10k keys | ~1.28 ms |
| negative lookup over 16 runs | ~6.5 µs |
The head-to-head against sled and redb is in
docs/PERFORMANCE.md.
Breaking changes
None. This release adds a test and documentation only.
Verification
Green on Windows x86_64 and Linux (WSL2), Rust stable and MSRV 1.87; macOS via the
CI matrix:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test
cargo test --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
cargo +1.87 clippy --all-targets --all-features -- -D warnings
cargo +1.87 test --all-features
RUSTFLAGS="--cfg loom" cargo test --test loom_lsm
cargo bench --bench lsm_bench
cargo deny check
cargo auditAll green. The default and --all-features suites add one concurrency-soak test
over 0.8.0; loom is unchanged at 2 model checks.
What's next
- 0.9.5 — RC. Critical fixes and documentation polish only.
- 1.0.0 — Stable. Definition-of-Done audit and publication. The engine is
feature-complete, hardened, and API-frozen; what stands between it and 1.0 is
the RC soak and the release cut.
Installation
[dependencies]
lsm-db = "0.9"
# Crash-safe writes and/or bloom-filtered point reads:
lsm-db = { version = "0.9", features = ["durability", "bloom"] }MSRV: Rust 1.87 (2024 edition).
Documentation
Full diff: v0.8.0...v0.9.0.
Changelog: CHANGELOG.md.