redb integration spike (0.8 → 0.9)¶
Status: findings recorded; adapter not shipped
Milestone: 0.8 P1 / promotion target 0.9 (SB-04)
Related: ADR-022, storage-backend-expansion.md
Scope¶
Bounded evaluation of redb as the first
pure-Rust optional durable adapter behind the sealed DurableStore boundary.
Findings¶
| Topic | Finding | Gate impact |
|---|---|---|
| MSRV | redb 2.x typically requires recent stable Rust; confirm against Oxiland MSRV 1.87 before enabling storage-redb |
Must not raise workspace MSRV without an ADR |
| Locking | Single-writer, MVCC readers; multi-process writer lock is exclusive | Map to StorageCapabilities; document writer lock errors as Error::Storage |
| Read-only open | Database can be opened read-only when no writer holds the lock | Required for parity with Fjall OpenOptions::read_only(true) |
| Batch atomicity | WriteTransaction commit is atomic for put/delete batches |
Fits apply_batch + sync adapter contract |
| Crash recovery | Committed transactions survive process crash; uncommitted do not | Must pass injected-failure conformance cases |
| Layout marker | Needs Oxiland-owned marker file/key distinct from Fjall LSM dirs | Wrong-backend open must fail before mutating foreign layouts |
| Packaging | Pure Rust, no C++ toolchain; license MIT/Apache-2.0 compatible | Good default-optional candidate; keep out of default features |
| Performance | Point lookups strong; full-scan of all quads needs ordered range iteration over Oxiland key encoding | Measure against Fjall baselines in 0.9 before advertising |
Non-findings / open work for 0.9¶
- Implement
DurableStoreadapter + featurestorage-redb. - Register in
compiled_backends()only when the feature is enabled. - Extend
tests/backend_conformance.rsregistration. - Record format version / marker policy in a per-backend ADR or design note.
- Confirm Windows + macOS + Linux CI matrix with the feature enabled.
Decision for 0.8¶
Defer implementation. Fjall remains the only durable compiled backend in
0.8. redb stays a known-but-not-compiled name in StorageBackend::from_name.