How Anvil DB is built
ACID Transactions
Clone-based rollback for atomicity, triggers and sync rules for consistency, single-writer RwLock for serializable isolation, and WAL with fsync for durability.
Read deep diveWrite-Ahead Log
Redo-only crash recovery, CRC32 checksums, segment rotation, and a checkpoint strategy that bounds recovery time regardless of WAL size.
Read deep diveARIES Recovery
Analysis, redo, and undo phases with dirty-page tracking, transaction classification, and before-image rollback for incomplete transactions.
Read deep diveMVCC Transactions
Version chains, three isolation levels, record-level locking, deadlock detection, savepoints, and 98 tests covering concurrent workloads.
Read deep diveB+ Tree Index
Generic key-value indexing with leaf-linked range scans, bulk loading, concurrent access, and 51 dedicated tests.
Read deep diveLRU Page Cache
O(1) lookup and eviction via a flat-vec doubly-linked list, dirty page tracking, configurable page sizes, and free page management.
Read deep diveVolcano Executor
30+ pull-based physical operators, cost-based optimizer, memory tracking, query cancellation, and streaming result delivery.
Read deep diveData Compression
Custom LZ4-style and Zstd-style algorithms implemented in pure safe Rust with no external dependencies.
Read deep dive