skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

On the complexity of checking transactional consistency

Published:10 October 2019Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

a165-biswas

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.Google ScholarGoogle Scholar
  2. Antidote. 2019a. https://www.antidotedb.eu Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  3. Antidote. 2019b. https://antidotedb.gitbook.io/documentation/overview/configuration Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.04509Google ScholarGoogle Scholar
  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=3009888Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cockroach. 2019a. https://github.com/cockroachdb/cockroach Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  12. Cockroach. 2019b. https://www.cockroachlabs.com/docs/v2.1/transactions.html#isolation- levels Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarCross RefCross Ref
  14. Michael Emmi and Constantin Enea. 2018. Sound, complete, and tractable linearizability monitoring for concurrent collections. PACMPL 2, POPL (2018), 25:1–25:27. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Galera. 2019a. http://galeracluster.com Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  17. Galera. 2019b. http://galeracluster.com/documentation- webpages/faq.html Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  18. Galera. 2019c. http://galeracluster.com/documentation- webpages/isolationlevels.html#intra- node- vs- inter- node- isolationin- galera- cluster Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  19. Phillip B. Gibbons and Ephraim Korach. 1997. Testing Shared Memories. SIAM J. Comput. 26, 4 (1997), 1208–1244. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Kyle Kingsbury. 2013-2019. http://jepsen.io Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  21. Kyle Kingsbury. 2015. https://github.com/jepsen- io/jepsen/blob/master/galera/src/jepsen/galera/dirty_reads.clj Retrieved March 28th, 2019.Google ScholarGoogle Scholar
  22. Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21, 7 (1978), 558–565. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631–653. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. On the complexity of checking transactional consistency

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!