skip to main content

Static serializability analysis for causal consistency

Published:11 June 2018Publication History
Skip Abstract Section

Abstract

Many distributed databases provide only weak consistency guarantees to reduce synchronization overhead and remain available under network partitions. However, this leads to behaviors not possible under stronger guarantees. Such behaviors can easily defy programmer intuition and lead to errors that are notoriously hard to detect.

In this paper, we propose a static analysis for detecting non-serializable behaviors of applications running on top of causally-consistent databases. Our technique is based on a novel, local serializability criterion and combines a generalization of graph-based techniques from the database literature with another, complementary analysis technique that encodes our serializability criterion into first-order logic formulas to be checked by an SMT solver. This analysis is more expensive yet more precise and produces concrete counter-examples.

We implemented our methods and evaluated them on a number of applications from two different domains: cloud-backed mobile applications and clients of a distributed database. Our experiments demonstrate that our analysis is able to detect harmful serializability violations while producing only a small number of false alarms.

References

  1. Atul Adya. 1999. Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions. PhD Thesis. Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Deepthi Devaki Akkoorath and Annette Bieniusa. 2016. Antidote: The Highly-Available Geo-Replicated Database with Strongest Guarantees. Technical Report. Tech. U. Kaiserslautern. https://syncfree.lip6.fr/ attachments/article/59/antidote-white-paper.pdfGoogle ScholarGoogle Scholar
  3. Jade Alglave, Daniel Kroening, Vincent Nimal, and Daniel Poetzl. 2014. Don’t Sit on the Fence. In Lecture Notes in Computer Science (Lecture Notes in Computer Science). Springer, 508–524.Google ScholarGoogle Scholar
  4. Jade Alglave, Daniel Kroening, and Michael Tautschnig. 2013. Partial Orders for Efficient Bounded Model Checking of Concurrent Software. In CAV’13. Springer, 141–157.Google ScholarGoogle Scholar
  5. Rajeev Alur, Ken McMillan, and Doron Peled. 2000. Model-Checking of Correctness Conditions for Concurrent Objects. Inf. Comput. 160, 1 (2000), 167–188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Hagit Attiya, Faith Ellen, and Adam Morrison. 2017. Limitations of Highly-Available Eventually-Consistent Data Stores. IEEE Transactions on Parallel and Distributed Systems 28, 1 (2017), 141–155. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Peter Bailis, Alan Fekete, Joseph M. Hellerstein, Ali Ghodsi, and Ion Stoica. 2014. Scalable Atomic Visibility with RAMP Transactions. In SIGMOD ’14. ACM, 27–38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Peter Bailis, Ali Ghodsi, Joseph M. Hellerstein, and Ion Stoica. 2013. Bolt-on Causal Consistency. In SIGMOD ’13. ACM, 761–772. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Giovanni Bernardi and Alexey Gotsman. 2016. Robustness against Consistency Models with Atomic Visibility. In CONCUR’16.Google ScholarGoogle Scholar
  10. Ahmed Bouajjani, Constantin Enea, and Jad Hamza. 2014. Verifying Eventual Consistency of Optimistic Replication Systems. In POPL ’14. ACM, 285–296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin Vechev. 2017. Serializability for Eventual Consistency: Criterion, Analysis, and Applications. In POPL ’17. ACM, 458–472. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin Vechev. 2018. Static Serializability Analysis for Causal Consistency (extended version). Technical Report. ETH Zurich.Google ScholarGoogle Scholar
  13. Lucas Brutschy, Pietro Ferrara, and Peter Müller. 2014. Static Analysis for Independent App Developers. In OOPSLA ’14. ACM, 847–860. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Sebastian Burckhardt. 2014. Principles of Eventual Consistency. Found. Trends Program. Lang. 1, 1-2 (2014), 1–150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sebastian Burckhardt, Rajeev Alur, and Milo M. K. Martin. 2007. CheckFence: Checking Consistency of Concurrent Data Types on Relaxed Memory Models. In PLDI ’07. ACM, 12–21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Sebastian Burckhardt, Manuel Fähndrich, Daan Leijen, and Benjamin P. Wood. 2012. Cloud Types for Eventual Consistency. In ECOOP’12. Springer, 283–307. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Sebastian Burckhardt, Alexey Gotsman, Hongseok Yang, and Marek Zawirski. 2014. Replicated Data Types: Specification, Verification, Optimality. In POPL ’14. ACM, 271–284. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Sebastian Burckhardt, Daan Leijen, Jonathan Protzenko, and Manuel Fähndrich. 2015. Global Sequence Protocol: A Robust Abstraction for Replicated Shared State. In Leibniz International Proceedings in Informatics (LIPIcs), John Tang Boyland (Ed.), Vol. 37. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 568–590.Google ScholarGoogle Scholar
  19. Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gunavardhan Kakulapati, Avinash Lakshman, Alex Pilchin, Swaminathan Sivasubramanian, Peter Vosshall, and Werner Vogels. 2007. Dynamo: Amazon’s Highly Available Key-Value Store. In SOSP ’07. ACM, 205–220. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Xing Fang, Jaejin Lee, and Samuel P. Midkiff. 2003. Automatic Fence Insertion for Shared Memory Multiprocessing. In ICS ’03. ACM, 285– 294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Azadeh Farzan and P. Madhusudan. 2008. Monitoring Atomicity in Concurrent Programs. In CAV ’08. Springer, 52–65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Alan Fekete, Dimitrios Liarokapis, Elizabeth O’Neil, Patrick O’Neil, and Dennis Shasha. 2005. Making Snapshot Isolation Serializable. ACM Trans. Database Syst. 30, 2 (2005), 492–528. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Seth Gilbert and Nancy Lynch. 2002. Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services. SIGACT News 33, 2 (2002), 51–59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Alexey Gotsman, Hongseok Yang, Carla Ferreira, Mahsa Najafzadeh, and Marc Shapiro. 2016. ’Cause I’m Strong Enough: Reasoning About Consistency Choices in Distributed Systems. In POPL ’16. ACM, 371– 384. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sudhir Jorwekar, Alan Fekete, Krithi Ramamritham, and S. Sudarshan. 2007. Automating the Detection of Snapshot Isolation Anomalies. In VLDB ’07. VLDB Endowment, 1263–1274. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Arvind Krishnamurthy and Katherine Yelick. 1996. Analyses and Optimizations for Shared Address Space Programs. J. Parallel Distrib. Comput. 38, 2 (1996), 130–144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Michael Kuperstein, Martin Vechev, and Eran Yahav. 2010. Automatic Inference of Memory Fences. In FMCAD ’10. FMCAD Inc, 111–120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Avinash Lakshman and Prashant Malik. 2010. Cassandra: A Decentralized Structured Storage System. SIGOPS Oper. Syst. Rev. 44, 2 (2010), 35–40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, and David G. Andersen. 2011. Don’t Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS. In SOSP ’11. ACM, 401–416. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, and David G. Andersen. 2013. Stronger Semantics for Low-Latency Geo-Replicated Storage. In NSDI ’13. USENIX Association, 313–328. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Dennis Shasha and Marc Snir. 1988. Efficient and Correct Execution of Parallel Programs That Share Memory. ACM Trans. Program. Lang. Syst. 10, 2 (1988), 282–312. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Yair Sovran, Russell Power, Marcos K. Aguilera, and Jinyang Li. 2011. Transactional Storage for Geo-Replicated Systems. In SOSP ’11. ACM, 385–400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Zehra Sura, Xing Fang, Chi-Leung Wong, Samuel P. Midkiff, Jaejin Lee, and David Padua. 2005. Compiler Techniques for High Performance Sequentially Consistent Java Programs. In PPoPP ’05. ACM, 2–13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Nikolai Tillmann, Michal Moskal, Jonathan de Halleux, and Manuel Fahndrich. 2011. TouchDevelop: Programming Cloud-Connected Mobile Devices via Touchscreen. In Onward! 2011. ACM, 49–60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot - a Java Bytecode Optimization Framework. In CASCON ’99. IBM Press.Google ScholarGoogle Scholar
  36. Mandana Vaziri, Frank Tip, and Julian Dolby. 2006. Associating Synchronization Constraints with Data in an Object-Oriented Language. In POPL ’06. ACM, 334–345. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. William E. Weihl. 1988. Commutativity-Based Concurrency Control for Abstract Data Types. IEEE Trans. Comput. 37, 12 (1988), 1488–1505. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. John Wickerson, Mark Batty, Tyler Sorensen, and George A. Constantinides. 2017. Automatically Comparing Memory Consistency Models. In POPL 2017. ACM, 190–204. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Static serializability analysis for causal 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!