Checking Robustness Against Snapshot Isolation

Transactional access to databases is an important abstraction allowing programmers to consider blocks of actions (transactions) as executing in isolation. The strongest consistency model is {\em serializability}, which ensures the atomicity abstraction of transactions executing over a sequentially consistent memory. Since ensuring serializability carries a significant penalty on availability, modern databases provide weaker consistency models, one of the most prominent being \emph{snapshot isolation}. In general, the correctness of a program relying on serializable transactions may be broken when using weaker models. However, certain programs may also be insensitive to consistency relaxations, i.e., all their properties holding under serializability are preserved even when they are executed over a weak consistent database and without additional synchronization. In this paper, we address the issue of verifying if a given program is {\em robust against snapshot isolation}, i.e., all its behaviors are serializable even if it is executed over a database ensuring snapshot isolation. We show that this verification problem is polynomial time reducible to a state reachability problem in transactional programs over a sequentially consistent shared memory. This reduction opens the door to the reuse of the classic verification technology for reasoning about weakly-consistent programs. In particular, we show that it can be used to derive a proof technique based on Lipton's reduction theory that allows to prove programs robust.

[1]  Suresh Jagannathan,et al.  Automated Detection of Serializability Violations under Weak Consistency , 2018, CONCUR.

[2]  Richard J. Lipton,et al.  Reduction: a method of proving properties of parallel programs , 1975, CACM.

[3]  Parosh Aziz Abdulla,et al.  Deciding Robustness against Total Store Ordering , 2011 .

[4]  Dexter Kozen,et al.  Lower bounds for natural proof systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[5]  Hongseok Yang,et al.  'Cause I'm strong enough: Reasoning about consistency choices in distributed systems , 2016, POPL.

[6]  Alan Fekete,et al.  The Cost of Serializability on Platforms That Use Snapshot Isolation , 2008, 2008 IEEE 24th International Conference on Data Engineering.

[7]  Serdar Tasiran,et al.  Automated and Modular Refinement Reasoning for Concurrent Programs , 2015, CAV.

[8]  Peter Müller,et al.  Serializability for eventual consistency: criterion, analysis, and applications , 2017, POPL.

[9]  Alexey Gotsman,et al.  Robustness against Consistency Models with Atomic Visibility , 2016, CONCUR.

[10]  Bor-Yuh Evan Chang,et al.  Boogie: A Modular Reusable Verifier for Object-Oriented Programs , 2005, FMCO.

[11]  Barbara Liskov,et al.  Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions , 1999 .

[12]  Charles Rackoff,et al.  The Covering and Boundedness Problems for Vector Addition Systems , 1978, Theor. Comput. Sci..

[13]  Peter Müller,et al.  Static serializability analysis for causal consistency , 2018, PLDI.

[14]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[15]  Roland Meyer,et al.  Robustness against Power is PSpace-complete , 2014, ICALP.

[16]  Luis Ceze,et al.  Disciplined Inconsistency with Consistency Types , 2016, SoCC.

[17]  Roland Meyer,et al.  Checking and Enforcing Robustness against TSO , 2013, ESOP.

[18]  Alexey Gotsman,et al.  Analysing Snapshot Isolation , 2018, J. ACM.

[19]  Serdar Tasiran,et al.  Reasoning About TSO Programs Using Reduction and Abstraction , 2018, CAV.

[20]  Dennis Shasha,et al.  Efficient and correct execution of parallel programs that share memory , 1988, TOPL.

[21]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.