Automated Detection of Serializability Violations under Weak Consistency

06/21/2018
by   Kartik Nagar, et al.
0

While a number of weak consistency mechanisms have been developed in recent years to improve performance and ensure availability in distributed, replicated systems, ensuring correctness of transactional applications running on top of such systems remains a difficult and important problem. Serializability is a well-understood correctness criterion for transactional programs; understanding whether applications are serializable when executed in a weakly-consistent environment, however remains a challenging exercise. In this work, we combine the dependency graph-based characterization of serializability and the framework of abstract executions to develop a fully automated approach for statically finding bounded serializability violations under any weak consistency model. We reduce the problem of serializability to satisfiability of a formula in First-Order Logic, which allows us to harness the power of existing SMT solvers. We provide rules to automatically construct the FOL encoding from programs written in SQL (allowing loops and conditionals) and the consistency specification written as a formula in FOL. In addition to detecting bounded serializability violations, we also provide two orthogonal schemes to reason about unbounded executions by providing sufficient conditions (in the form of FOL formulae) whose satisfiability would imply the absence of anomalies in any arbitrary execution. We have applied the proposed technique on TPC-C, a real world database program with complex application logic, and were able to discover anomalies under Parallel Snapshot Isolation, and verify serializability for unbounded executions under Snapshot Isolation, two consistency mechanisms substantially weaker than serializability.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/26/2017

Alone Together: Compositional Reasoning and Inference for Weak Isolation

Serializability is a well-understood correctness criterion that simplifi...
research
05/21/2019

Checking Robustness Against Snapshot Isolation

Transactional access to databases is an important abstraction allowing p...
research
01/22/2021

Checking Robustness Between Weak Transactional Consistency Models

Concurrent accesses to databases are typically encapsulated in transacti...
research
02/23/2018

IPA: Invariant-preserving Applications for Weakly-consistent Replicated Databases

Storage systems based on Weak Consistency provide better availability an...
research
03/04/2021

MonkeyDB: Effectively Testing Correctness against Weak Isolation Levels

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

Quantifying and Generalizing the CAP Theorem

In distributed applications, Brewer's CAP theorem tells us that when net...
research
08/15/2019

CLOTHO: Directed Test Generation for Weakly Consistent Database Systems

Relational database applications are notoriously difficult to test and d...

Please sign up or login with your details

Forgot password? Click here to reset