Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

On the complexity of checking transactional consistency

Published: 10 October 2019 Publication History

Abstract

Transactions simplify concurrent programming by enabling computations on shared data that are isolated from other concurrent computations and are resilient to failures. Modern databases provide different consistency models for transactions corresponding to different tradeoffs between consistency and availability. In this work, we investigate the problem of checking whether a given execution of a transactional database adheres to some consistency model. We show that consistency models like read committed, read atomic, and causal consistency are polynomial-time checkable while prefix consistency and snapshot isolation are NP-complete in general. These results complement a previous NP-completeness result concerning serializability. Moreover, in the context of NP-complete consistency models, we devise algorithms that are polynomial time assuming that certain parameters in the input executions, e.g., the number of sessions, are fixed. We evaluate the scalability of these algorithms in the context of several production databases.

Supplementary Material

a165-biswas (a165-biswas.webm)
Presentation at OOPSLA '19

References

[1]
Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, Magnus Lång, Tuan Phong Ngo, and Konstantinos (Kostis) Sagonas. 2019. Optimal Stateless Model Checking for Read-from Equivalence under Sequential Consistency. PACMPL OOPSLA.
[2]
Antidote. 2019a. https://www.antidotedb.eu Retrieved March 28th, 2019.
[3]
Antidote. 2019b. https://antidotedb.gitbook.io/documentation/overview/configuration Retrieved March 28th, 2019.
[4]
Hal Berenson, Philip A. Bernstein, Jim Gray, Jim Melton, Elizabeth J. O’Neil, and Patrick E. O’Neil. 1995. A Critique of ANSI SQL Isolation Levels. In Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data, San Jose, California, USA, May 22-25, 1995., Michael J. Carey and Donovan A. Schneider (Eds.). ACM Press, 1–10.
[5]
Ranadeep Biswas and Constantin Enea. 2019. On the Complexity of Checking Transactional Consistency. abs/1908.04509 (2019). arXiv: 1908.04509 https://arxiv.org/abs/1908.04509
[6]
Ahmed Bouajjani, Constantin Enea, Rachid Guerraoui, and Jad Hamza. 2017. On verifying causal consistency. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017, Giuseppe Castagna and Andrew D. Gordon (Eds.). ACM, 626–638. http://dl.acm.org/citation.cfm?id=3009888
[7]
Sebastian Burckhardt, Alexey Gotsman, Hongseok Yang, and Marek Zawirski. 2014. Replicated data types: specification, verification, optimality. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014, Suresh Jagannathan and Peter Sewell (Eds.). ACM, 271–284.
[8]
Sebastian Burckhardt, Daan Leijen, Jonathan Protzenko, and Manuel Fähndrich. 2015. Global Sequence Protocol: A Robust Abstraction for Replicated Shared State. In 29th European Conference on Object-Oriented Programming, ECOOP 2015, July 5-10, 2015, Prague, Czech Republic (LIPIcs), John Tang Boyland (Ed.), Vol. 37. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 568–590.
[9]
Andrea Cerone, Giovanni Bernardi, and Alexey Gotsman. 2015. A Framework for Transactional Consistency Models with Atomic Visibility. In 26th International Conference on Concurrency Theory, CONCUR 2015, Madrid, Spain, September 1.4, 2015 (LIPIcs), Luca Aceto and David de Frutos-Escrig (Eds.), Vol. 42. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 58–71.
[10]
Marek Chalupa, Krishnendu Chatterjee, Andreas Pavlogiannis, Nishant Sinha, and Kapil Vaidya. 2018. Data-centric dynamic partial order reduction. PACMPL 2, POPL (2018), 31:1–31:30.
[11]
Cockroach. 2019a. https://github.com/cockroachdb/cockroach Retrieved March 28th, 2019.
[12]
Cockroach. 2019b. https://www.cockroachlabs.com/docs/v2.1/transactions.html#isolation- levels Retrieved March 28th, 2019.
[13]
Niklas Eén and Niklas Sörensson. 2003. An Extensible SAT-solver. In Theory and Applications of Satisfiability Testing, 6th International Conference, SAT 2003. Santa Margherita Ligure, Italy, May 5-8, 2003 Selected Revised Papers (Lecture Notes in Computer Science), Enrico Giunchiglia and Armando Tacchella (Eds.), Vol. 2919. Springer, 502–518.
[14]
Michael Emmi and Constantin Enea. 2018. Sound, complete, and tractable linearizability monitoring for concurrent collections. PACMPL 2, POPL (2018), 25:1–25:27.
[15]
Cormac Flanagan and Patrice Godefroid. 2005. Dynamic partial-order reduction for model checking software. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2005, Long Beach, California, USA, January 12-14, 2005, Jens Palsberg and Martín Abadi (Eds.). ACM, 110–121.
[16]
Galera. 2019a. http://galeracluster.com Retrieved March 28th, 2019.
[17]
Galera. 2019b. http://galeracluster.com/documentation- webpages/faq.html Retrieved March 28th, 2019.
[18]
Galera. 2019c. http://galeracluster.com/documentation- webpages/isolationlevels.html#intra- node- vs- inter- node- isolationin- galera- cluster Retrieved March 28th, 2019.
[19]
Phillip B. Gibbons and Ephraim Korach. 1997. Testing Shared Memories. SIAM J. Comput. 26, 4 (1997), 1208–1244.
[20]
Kyle Kingsbury. 2013-2019. http://jepsen.io Retrieved March 28th, 2019.
[21]
Kyle Kingsbury. 2015. https://github.com/jepsen- io/jepsen/blob/master/galera/src/jepsen/galera/dirty_reads.clj Retrieved March 28th, 2019.
[22]
Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21, 7 (1978), 558–565.
[23]
Antoni W. Mazurkiewicz. 1986. Trace Theory. In Petri Nets: Central Models and Their Properties, Advances in Petri Nets 1986, Part II, Proceedings of an Advanced Course, Bad Honnef, Germany, 8-19 September 1986 (Lecture Notes in Computer Science), Wilfried Brauer, Wolfgang Reisig, and Grzegorz Rozenberg (Eds.), Vol. 255. Springer, 279–324.
[24]
Burcu Kulahcioglu Ozkan, Rupak Majumdar, Filip Niksic, Mitra Tabaei Befrouei, and Georg Weissenbacher. 2018. Randomized testing of distributed systems with probabilistic guarantees. PACMPL 2, OOPSLA (2018), 160:1–160:28.
[25]
Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631–653.
[26]
Douglas B. Terry, Alan J. Demers, Karin Petersen, Mike Spreitzer, Marvin Theimer, and Brent B. Welch. 1994. Session Guarantees for Weakly Consistent Replicated Data. In Proceedings of the Third International Conference on Parallel and Distributed Information Systems (PDIS 94), Austin, Texas, USA, September 28-30, 1994. IEEE Computer Society, 140–149.
[27]
Pierre Wolper. 1986. Expressing Interesting Properties of Programs in Propositional Temporal Logic. In Conference Record of the Thirteenth Annual ACM Symposium on Principles of Programming Languages, St. Petersburg Beach, Florida, USA, January 1986. ACM Press, 184–193.

Cited By

View all
  • (2024)Plume: Efficient and Complete Black-Box Checking of Weak Isolation LevelsProceedings of the ACM on Programming Languages10.1145/36897428:OOPSLA2(876-904)Online publication date: 8-Oct-2024
  • (2024)IsoPredict: Dynamic Predictive Analysis for Detecting Unserializable Behaviors in Weakly Isolated Data Store ApplicationsProceedings of the ACM on Programming Languages10.1145/36563918:PLDI(343-367)Online publication date: 20-Jun-2024
  • (2024)When View- and Conflict-Robustness Coincide for Multiversion Concurrency ControlProceedings of the ACM on Management of Data10.1145/36515922:2(1-16)Online publication date: 14-May-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 3, Issue OOPSLA
October 2019
2077 pages
EISSN:2475-1421
DOI:10.1145/3366395
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 October 2019
Published in PACMPL Volume 3, Issue OOPSLA

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. axiomatic specifications
  2. consistency
  3. testing
  4. transactional databases

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)278
  • Downloads (Last 6 weeks)18
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Plume: Efficient and Complete Black-Box Checking of Weak Isolation LevelsProceedings of the ACM on Programming Languages10.1145/36897428:OOPSLA2(876-904)Online publication date: 8-Oct-2024
  • (2024)IsoPredict: Dynamic Predictive Analysis for Detecting Unserializable Behaviors in Weakly Isolated Data Store ApplicationsProceedings of the ACM on Programming Languages10.1145/36563918:PLDI(343-367)Online publication date: 20-Jun-2024
  • (2024)When View- and Conflict-Robustness Coincide for Multiversion Concurrency ControlProceedings of the ACM on Management of Data10.1145/36515922:2(1-16)Online publication date: 14-May-2024
  • (2024)Validating Database System Isolation Level Implementations with Version Certificate RecoveryProceedings of the Nineteenth European Conference on Computer Systems10.1145/3627703.3650080(754-768)Online publication date: 22-Apr-2024
  • (2024)Understanding Transaction Bugs in Database SystemsProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639207(1-13)Online publication date: 20-May-2024
  • (2024)Checking Transaction Isolation Violations Using Graph QueriesGraph Transformation10.1007/978-3-031-64285-2_11(203-213)Online publication date: 2-Jul-2024
  • (2023)Efficient Black-Box Checking of Snapshot Isolation in DatabasesProceedings of the VLDB Endowment10.14778/3583140.358314516:6(1264-1276)Online publication date: 20-Apr-2023
  • (2023)Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation LevelsProceedings of the ACM on Programming Languages10.1145/35912437:PLDI(565-590)Online publication date: 6-Jun-2023
  • (2023)Viper: A Fast Snapshot Isolation CheckerProceedings of the Eighteenth European Conference on Computer Systems10.1145/3552326.3567492(654-671)Online publication date: 8-May-2023
  • (2023)Detecting Isolation Bugs via Transaction Oracle Construction2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)10.1109/ICSE48619.2023.00101(1123-1135)Online publication date: May-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media