VART: A Persistent Data Structure For Snapshot Isolation
Blog post from SurrealDB
A resilient database must effectively manage concurrent transactions while preserving data integrity and consistency, focusing on the Isolation aspect of ACID properties. This blog post explores transaction isolation's nuances and introduces VART (Versioned Adaptive Radix Trie), a persistent data structure designed for snapshot isolation, which is crucial for maintaining database consistency during concurrent access. VART functions as the index within SurrealKV, a persistent in-memory Key-Value store, using Multiversion Concurrency Control (MVCC) to handle concurrent transactions. The post discusses the significance of persistent data structures, which allow access to multiple data versions, and highlights the use of Copy-On-Write (CoW) techniques to ensure persistence and versioning. These structures are crucial for snapshot isolation, providing each transaction with a consistent database view, and aiding in conflict detection and resolution. VART's design, leveraging Adaptive Radix Tries, optimizes search operations and supports both write and read-heavy workloads by offering immutability and versioning. Future improvements include persisting VART on disk for faster recovery, implementing node-caching to enhance read performance, and introducing vertical compression to reduce memory usage.