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
//! V3 Native Key-Value Store
//!
//! This module provides a native V3 implementation of key-value storage,
//! integrated with V3's page-based architecture and WAL.
//!
//! ## Architecture
//!
//! The KV store uses V3's existing infrastructure:
//! - **B+Tree index**: Maps key_hash → node_id for O(log n) lookups
//! - **Node storage**: KV entries stored as regular nodes with kind="_kv_"
//! - **WAL integration**: KV operations logged as V3WALRecord variants
//! - **MVCC**: Version history per key using LSN from WAL
//!
//! ## Design Decisions
//!
//! 1. **In-memory HashMap with WAL backing**: Fast reads, durable writes
//! 2. **Lazy TTL cleanup**: Expired entries filtered on read
//! 3. **Snapshot isolation**: Binary search for correct version at snapshot
//! 4. **Key hashing**: Uses std::hash for B+Tree compatibility
// Re-export public API
pub use KvStore;
pub use ;