Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · System coordination, integration and orchestration

Two-phase commit

Also known as: 2PC, Two-phase commit protocol

German: Zwei-Phasen-Commit

In distributed systems, two-phase commit (2PC) is an atomic commitment protocol in which a coordinator first asks all participants whether they can commit a transaction (prepare phase) and then, only if all agree, instructs them to commit, otherwise to abort (commit phase).

  • System integration

In one sentence

Two-phase commit is a protocol in which a coordinator commits a distributed transaction only if all participants first confirm they can.

Example

An order booking uses two-phase commit so that the ERP database and the MES database either both record the order or neither does.

How it applies

  • Engineering: 2PC gives atomicity across databases or resource managers that support it. Participants hold locks from the prepare phase until the decision, which reduces throughput and availability.
  • Failure behavior: If the Transaction coordinator fails after participants have prepared, they remain blocked in doubt until it recovers. This blocking is the main weakness of 2PC.
  • Architecture: Across independent services or companies, 2PC is rarely practical; the Saga pattern is the usual alternative.
  • Documentation: Where 2PC is used, document the participants, timeouts and the manual resolution procedure for in-doubt transactions in the administration documentation.

Two-phase commit vs. saga

2PC provides all-or-nothing commit with locks held during the protocol. A saga executes local transactions one after another and undoes completed ones with compensating actions on failure, giving eventual rather than immediate consistency.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Knowledge editorial definition, based on distributed transaction processing theory

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!