VerIso: Verifiable Isolation Guarantees for Database Transactions

Shabnam Ghasemirad, Si Liu, Christoph Sprenger, Luca Multazzu, David A. Basin

Abstract

Ensuring isolation in distributed database systems is a complex challenge, as subtle logic flaws in transaction protocols can lead to data corruption and consistency violations. Traditional methods like manual proofs and model checking are often error-prone or limited in scope. This paper introduces VerIso, the first mechanized framework for formally verifying isolation guarantees. Built within the Isabelle/HOL theorem prover, VerIso utilizes refinement mapping and a parameterized abstract model to prove protocol correctness across an infinite state space. We demonstrate the framework's efficacy by verifying the classical S2PL+2PC protocol and uncovering a previously unknown isolation bug in the TAPIR protocol, which violates even basic Read Atomicity guarantees.

Introduction

In distributed database systems, "isolation" is the fundamental property that ensures concurrent transactions do not interfere with one another, maintaining a consistent view of data. While Strict Serializability (SSER) represents the ideal standard for correctness, many modern high-performance databases opt for weaker isolation levels to reduce latency and increase throughput.

However, designing these protocols is notoriously difficult. Even production-grade systems like YugabyteDB and MariaDB have been found to contain subtle isolation bugs that escape traditional testing. These flaws are often rooted in the fundamental logic of the protocol rather than simple implementation errors. Existing verification techniques—such as pen-and-paper proofs—are susceptible to human oversight, while model checking is typically restricted to a small, finite number of transactions. VerIso addresses these gaps by providing a systematic, mechanized way to prove that a protocol design is correct for any number of transactions and system behaviors.

The VerIso Framework

VerIso is implemented in the Isabelle/HOL interactive theorem prover, providing a rigorous mathematical foundation for protocol analysis. The framework is built around three core components:

1. The Parameterized Abstract Model

Rather than creating a new model for every isolation level, VerIso employs a centralized "abstract transaction model." This model serves as a template that can be configured for various isolation levels—such as Read Atomicity, Snapshot Isolation, or Serializability—by adjusting specific "guards" or logical conditions. This unified approach allows researchers to understand diverse consistency models through a single mathematical lens.

2. Refinement Mapping

To verify a specific protocol, developers model it as a transition system within Isabelle. Verification is achieved through refinement: the developer must prove that every step taken by the concrete protocol corresponds to a valid transition in the abstract model. If this correspondence holds, the concrete protocol is guaranteed to inherit the isolation properties of the abstract model.

3. Proof Automation and Library Support

Formal verification is historically labor-intensive. To mitigate the "proof burden," VerIso includes an extensive library of over 350 lemmas and specialized automated tools. These resources assist in handling complex properties common in distributed systems, such as "last-write-wins" semantics and causal consistency, making the verification process more accessible to researchers.

Evaluation and Bug Discovery

The authors evaluated VerIso against several prominent protocol designs, leading to both successful verifications and significant new findings.

  • S2PL + 2PC: The framework successfully verified that the combination of Strict Two-Phase Locking and Two-Phase Commit satisfies Strict Serializability.
  • TAPIR Protocol: TAPIR is a high-performance distributed protocol designed to provide SSER. When the authors attempted to verify TAPIR using VerIso, the proof failed. Analysis of the failed proof obligations revealed a fundamental flaw: TAPIR violates Atomic Visibility (Read Atomicity). This means a transaction’s updates can be partially observed by other transactions—a phenomenon known as "fractured reads."
  • Validation: To ensure the theoretical flaw was not an artifact of the model, the authors used IsoVista, a black-box isolation checker, to test the actual TAPIR implementation. The tool confirmed the existence of the bug in the production codebase, validating VerIso’s ability to find real-world architectural flaws.

Key Insights

A major contribution of VerIso is the use of failed proofs as a diagnostic tool. When a proof cannot be completed, the remaining unprovable obligations point directly to the logic break in the protocol. This allows developers to construct precise counterexamples and bug reports. Furthermore, by focusing on the protocol design rather than the specific implementation (e.g., C++ or Go code), VerIso identifies high-level architectural errors that are often the most expensive and difficult to fix after a system has been deployed.

Limitations and Future Work

While VerIso represents a significant advancement in formal database verification, it currently has several limitations:

  • Model Scope: The framework is currently optimized for Key-Value Store (KVS) models and does not yet support complex relational features like SQL predicate queries.
  • Fault Tolerance: The current model assumes nodes do not crash. While isolation and fault tolerance are often treated as orthogonal issues, integrating failure modeling would provide more comprehensive guarantees.
  • Usability: Using Isabelle/HOL requires deep expertise in formal logic, meaning VerIso is currently a tool for specialists rather than general software engineers.

Future development aims to extend VerIso to weaker isolation levels like "Read Committed" and to implement automated invariant generation to further streamline the verification workflow.

Summary updated

BibTeX
@article{ghasemirad2025veriso,
  author = {Shabnam Ghasemirad and Si Liu and Christoph Sprenger and Luca Multazzu and David A. Basin},
  title = {{VerIso: Verifiable Isolation Guarantees for Database Transactions}},
  journal = {Proc. VLDB Endow.},
  year = {2025},
  doi = {10.14778/3718057.3718065},
}
Figure