1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! B+ Tree with MVCC
//!
//! A concurrent B+ tree implementation with multi-version concurrency control.
//!
//! # Design
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────────┐
//! │ B+ Tree │
//! ├─────────────────────────────────────────────────────────────────┤
//! │ Internal Nodes │
//! │ ┌─────┬─────┬─────┐ │
//! │ │ K1 │ K2 │ K3 │ Keys only (no values) │
//! │ └──┬──┴──┬──┴──┬──┘ │
//! │ │ │ │ Pointers to children │
//! │ ▼ ▼ ▼ │
//! │ ┌─────┐ ┌─────┐ ┌─────┐ │
//! │ │Leaf1│ │Leaf2│ │Leaf3│ Leaf nodes (with values) │
//! │ └──┬──┘ └──┬──┘ └──┬──┘ │
//! │ │ │ │ Sibling pointers │
//! │ └───────┴───────┘ │
//! └─────────────────────────────────────────────────────────────────┘
//!
//! MVCC Version Chain:
//! ┌─────────────────┐ ┌─────────────────┐
//! │ Version (txn=5) │ ──▶ │ Version (txn=3) │ ──▶ null
//! │ value = "new" │ │ value = "old" │
//! └─────────────────┘ └─────────────────┘
//! ```
//!
//! # Features
//!
//! - Lock-free reads via MVCC snapshots
//! - Optimistic writes with version validation
//! - Automatic garbage collection of old versions
//! - Support for range scans and prefix queries
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;