Alone Together: Compositional Reasoning and Inference for Weak Isolation

10/26/2017
by   Gowtham Kaki, et al.
0

Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance and hence database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency invariants associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Case studies and experiments of real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/21/2019

Checking Robustness Against Snapshot Isolation

Transactional access to databases is an important abstraction allowing p...
research
06/21/2018

Automated Detection of Serializability Violations under Weak Consistency

While a number of weak consistency mechanisms have been developed in rec...
research
03/09/2021

Repairing Serializability Bugs in Distributed Database Programs via Automated Schema Refactoring

Serializability is a well-understood concurrency control mechanism that ...
research
08/15/2019

CLOTHO: Directed Test Generation for Weakly Consistent Database Systems

Relational database applications are notoriously difficult to test and d...
research
03/22/2023

Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation Levels

Modern applications, such as social networking systems and e-commerce pl...
research
10/04/2021

Weakly Durable High-Performance Transactions

Existing disk-based database systems largely fall into two categories – ...
research
04/13/2023

Choreographic Programming of Isolated Transactions

Implementing distributed systems is hard; choreographic programming aims...

Please sign up or login with your details

Forgot password? Click here to reset