AWDIT: An Optimal Weak Database Isolation Tester

📅 2025-04-09
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Modern databases commonly adopt weak isolation levels—such as Read Committed (RC), Read Atomic (RA), and Causal Consistency (CC)—to balance low latency, high throughput, and partition tolerance; yet isolation anomalies frequently occur in production, jeopardizing data consistency. Existing black-box testing tools suffer from high polynomial complexity, severely limiting scalability to large-scale workloads. This paper presents the first *progressively optimal* weak-isolation verification framework. Theoretically, we establish the first Ω(n^{3/2}) lower bound for RC/RA violation detection and achieve matching O(n^{3/2}) time complexity for RC/RA and O(n·k) for CC. Technically, we integrate dependency graph modeling, incremental dependency analysis, session-aware pruning, and optimal path validation. Experiments demonstrate average speedups of 245× (RC), 193× (RA), and 62× (CC) on large transaction histories, substantially breaking scalability bottlenecks in practical verification.

Technology Category

Application Category

📝 Abstract
In order to achieve low latency, high throughput, and partition tolerance, modern databases forgo strong transaction isolation for weak isolation guarantees. However, several production databases have been found to suffer from isolation bugs, breaking their data-consistency contract. Black-box testing is a prominent technique for detecting isolation bugs, by checking whether histories of database transactions adhere to a prescribed isolation level. Testing databases on realistic workloads of large size requires isolation testers to be as efficient as possible, a requirement that has initiated a study of the complexity of isolation testing. Although testing strong isolation has been known to be NP-complete, weak isolation levels were recently shown to be testable in polynomial time, which has propelled the scalability of testing tools. However, existing testers have a large polynomial complexity, restricting testing to workloads of only moderate size, which is not typical of large-scale databases. In this work, we develop AWDIT, a highly-efficient and provably optimal tester for weak database isolation. Given a history $H$ of size $n$ and $k$ sessions, AWDIT tests whether H satisfies the most common weak isolation levels of Read Committed (RC), Read Atomic (RA), and Causal Consistency (CC) in time $O(n^{3/2})$, $O(n^{3/2})$, and $O(n cdot k)$, respectively, improving significantly over the state of the art. Moreover, we prove that AWDIT is essentially optimal, in the sense that there is a conditional lower bound of $n^{3/2}$ for any weak isolation level between RC and CC. Our experiments show that AWDIT is significantly faster than existing, highly optimized testers; e.g., for the $sim$20% largest histories, AWDIT obtains an average speedup of $245 imes$, $193 imes$, and $62 imes$ for RC, RA, and CC, respectively, over the best baseline.
Problem

Research questions and friction points this paper is trying to address.

Detects isolation bugs in weak database isolation levels
Improves efficiency of testing large-scale database workloads
Provides optimal testing for Read Committed, Read Atomic, Causal Consistency
Innovation

Methods, ideas, or system contributions that make the work stand out.

Efficient weak isolation tester AWDIT
Optimal testing complexity O(n^3/2)
Significant speedup over existing testers
🔎 Similar Papers
No similar papers found.