EasyCommit: A Non-blocking Two-phase Commit Protocol

Large scale distributed databases are designed to support commercial and cloud based applications. The minimal expectation from such systems is that they ensure consistency and reliability in case of node failures. The distributed database guarantees reliability through the use of atomic commitment protocols. Atomic commitment protocols help in ensuring that either all the changes of a transaction are applied or none of them exist. To ensure efficient commitment process, the database community has mainly used the two-phase commit (2PC) protocol. However, the 2PC protocol is blocking under multiple failures. This necessitated the development of the non-blocking, three-phase commit (3PC) protocol. However, the database community is still reluctant to use the 3PC protocol, as it acts as a scalability bottleneck in the design of efficient transaction processing systems. In this work, we present Easy Commit which leverages the best of both the worlds (2PC and 3PC), that is, non-blocking (like 3PC) and requires two phases (like 2PC). Easy Commit achieves these goals by ensuring two key observations: (i) first transmit and then commit, and (ii) message redundancy. We present the design of the Easy Commit protocol and prove that it guarantees both safety and liveness. We also present a detailed evaluation of EC protocol, and show that it is nearly as efficient as the 2PC protocol.

[1]  Philip A. Bernstein,et al.  Categories and Subject Descriptors: H.2.4 [Database Management]: Systems. , 2022 .

[2]  Gustavo Alonso,et al.  A Low-Latency Non-blocking Commit Service , 2001, DISC.

[3]  Divyakant Agrawal,et al.  Serializability, not Serial: Concurrency Control and Availability in Multi-Datacenter Datastores , 2012, Proc. VLDB Endow..

[4]  Jayant R. Haritsa,et al.  The PROMPT Real-Time Commit Protocol , 2000, IEEE Trans. Parallel Distributed Syst..

[5]  Leslie Lamport,et al.  The part-time parliament , 1998, TOCS.

[6]  Masaru Kitsuregawa,et al.  Reducing the blocking in two-phase commit protocol employing backup sites , 1998, Proceedings. 3rd IFCIS International Conference on Cooperative Information Systems (Cat. No.98EX122).

[7]  Michael Stonebraker,et al.  A Formal Model of Crash Recovery in a Distributed System , 1983, IEEE Transactions on Software Engineering.

[8]  Philip A. Bernstein,et al.  Concurrency Control in Distributed Database Systems , 1986, CSUR.

[9]  Jeremy Clark,et al.  SoK: Research Perspectives and Challenges for Bitcoin and Cryptocurrencies , 2015, 2015 IEEE Symposium on Security and Privacy.

[10]  Flaviu Cristian,et al.  A low-cost atomic commit protocol , 1990, Proceedings Ninth Symposium on Reliable Distributed Systems.

[11]  Leslie Lamport,et al.  Consensus on transaction commit , 2004, TODS.

[12]  Jim Gray,et al.  Notes on Data Base Operating Systems , 1978, Advanced Course: Operating Systems.

[13]  Kenneth A. Ross,et al.  Making Updates Disk-I/O Friendly Using SSDs , 2013, Proc. VLDB Endow..

[14]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[15]  C. Mohan,et al.  Two-phase commit optimizations in a commercial distributed environment , 1995, Distributed and Parallel Databases.

[16]  Marc Pilkington,et al.  Blockchain Technology: Principles and Applications , 2015 .

[17]  Michael Stonebraker,et al.  An Evaluation of Distributed Concurrency Control , 2017, Proc. VLDB Endow..

[18]  Rachid Guerraoui Revistiting the Relationship Between Non-Blocking Atomic Commitment and Consensus , 1995, WDAG.

[19]  Adam Silberstein,et al.  Benchmarking cloud serving systems with YCSB , 2010, SoCC '10.

[20]  Jim Gray,et al.  The Transaction Concept: Virtues and Limitations (Invited Paper) , 1981, VLDB.

[21]  Carlo Curino,et al.  Skew-aware automatic database partitioning in shared-nothing, parallel OLTP systems , 2012, SIGMOD Conference.

[22]  Patrick Valduriez,et al.  Principles of distributed database systems (2nd ed.) , 1999 .

[23]  Rachid Guerraoui,et al.  One-phase commit: does it make sense? , 1998, Proceedings 1998 International Conference on Parallel and Distributed Systems (Cat. No.98TB100250).

[24]  Bipin C. Desai,et al.  A two-phase commit protocol and its performance , 1996, Proceedings of 7th International Conference and Workshop on Database and Expert Systems Applications: DEXA 96.

[25]  Kenneth A. Ross,et al.  Reducing Database Locking Contention Through Multi-version Concurrency , 2014, Proc. VLDB Endow..

[26]  Rachid Guerraoui,et al.  Fast non-blocking atomic commit: an inherent trade-off , 2004, Inf. Process. Lett..

[27]  Jim Gray A Comparison of the Byzantine Agreement Problem and the Transaction Commit Problem , 1986, Fault-Tolerant Distributed Computing.

[28]  Daniel J. Abadi,et al.  Calvin: fast distributed transactions for partitioned database systems , 2012, SIGMOD Conference.

[29]  Michael J. Freedman,et al.  Stronger Semantics for Low-Latency Geo-Replicated Storage , 2013, NSDI.

[30]  Craig Freedman,et al.  Hekaton: SQL server's memory-optimized OLTP engine , 2013, SIGMOD '13.

[31]  Christopher Frost,et al.  Spanner: Google's Globally-Distributed Database , 2012, OSDI.

[32]  Mohammad Sadoghi ExpoDB: An Exploratory Data Science Platform , 2017, CIDR.

[33]  Ali Ghodsi,et al.  Scalable atomic visibility with RAMP transactions , 2014, SIGMOD Conference.

[34]  Michael Stonebraker,et al.  The Case for Shared Nothing , 1985, HPTS.

[35]  Abraham Silberschatz,et al.  An optimistic commit protocol for distributed transaction management , 1991, SIGMOD '91.

[36]  Ian Rae,et al.  F1: A Distributed SQL Database That Scales , 2013, Proc. VLDB Endow..

[37]  Yawei Li,et al.  Megastore: Providing Scalable, Highly Available Storage for Interactive Services , 2011, CIDR.

[38]  Yu Cao,et al.  Online Data Partitioning in Distributed Database Systems , 2015, EDBT.

[39]  Bruce G. Lindsay,et al.  Transaction management in the R* distributed database management system , 1986, TODS.

[40]  Ali Ghodsi,et al.  Highly Available Transactions: Virtues and Limitations , 2013, Proc. VLDB Endow..

[41]  Mustafa Canim,et al.  L-Store: A Real-time OLTP and OLAP System , 2016, EDBT.

[42]  Michael Stonebraker,et al.  H-store: a high-performance, distributed main memory transaction processing system , 2008, Proc. VLDB Endow..

[43]  Rachid Guerraoui,et al.  Reducing the cost for non-blocking in atomic commitment , 1996, Proceedings of 16th International Conference on Distributed Computing Systems.

[44]  Dale Skeen,et al.  A Quorum-Based Commit Protocol , 1982, Berkeley Workshop.