Skip to main content

Two-Phase Commit Protocol

  • Reference work entry
  • First Online:
Encyclopedia of Database Systems
  • 50 Accesses

Synonyms

XA standard

Definition

The two-phase commit (2PC) protocol is a distributed algorithm to ensure the consistent termination of a transaction in a distributed environment. Thus, via 2PC a unanimous decision is reached and enforced among multiple participating servers whether to commit or abort a given transaction, thereby guaranteeing atomicity. The protocol proceeds in two phases, namely, the prepare (or voting) and the commit (or decision) phase, which explains the protocol’s name.

The protocol is executed by a coordinator process, while the participating servers are called participants. When the transaction’s initiator issues a request to commit the transaction, the coordinator starts the first phase of the 2PC protocol by querying – via prepare messages – all participants whether to abort or to commit the transaction. If all participants vote to commit, then in the second phase, the coordinator informs all participants to commit their share of the transaction by sending a com...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 4,499.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 6,499.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Cabrera LF et al. Web services atomic transaction, 2005.

    Google Scholar 

  2. Gray J. Notes on database operating systems. In: Bayer R, Graham MR, Seegmüller G, editors. Operating systems: an advanced course, Lecture notes in computer science, vol. 60. Berlin: Springer; 1978. p. 393–481.

    Chapter  Google Scholar 

  3. Gray J, Reuter A. Transaction processing: concepts and techniques. San Francisco: Morgan Kaufmann; 1993.

    MATH  Google Scholar 

  4. Lampson BW, Sturgis H. Crash recovery in distributed data storage systems. Technical Report. Palo Alto: Xerox Palo Alto Research Center.

    Google Scholar 

  5. OMG Transaction Service, version 1.4. http://www.omg.org/technology/documents/formal/transaction_service.htm (2007).

  6. Sun Microsystems. Java Transaction API (JTA). http://java.sun.com/jta/; http://java.sun.com/jta/ (2007).

  7. The Open GROUP Distributed Transaction Processing: The XA Specification. X/Open Company Ltd, ISBN 1 872630 24 3; 1991.

    Google Scholar 

  8. Weikum G, Vossen G. Transactional information systems – theory, algorithms, and the practice of concurrency control and recovery. San Francisco: Morgan Kaufmann; 2002.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jens Lechtenbörger .

Editor information

Editors and Affiliations

Section Editor information

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Science+Business Media, LLC, part of Springer Nature

About this entry

Check for updates. Verify currency and authenticity via CrossMark

Cite this entry

Lechtenbörger, J. (2018). Two-Phase Commit Protocol. In: Liu, L., Özsu, M.T. (eds) Encyclopedia of Database Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-8265-9_2

Download citation

Publish with us

Policies and ethics