Atomic Commit

Summary: A distributed systems problem ensuring that all nodes involved in a transaction either commit or abort, maintaining atomicity across multiple nodes.

Sources: chapter9

Last updated: 2026-04-17


Atomic commit is the problem of ensuring that a transaction either commits on all participating nodes or aborts on all of them, keeping the database consistent (source: chapter9, p. 352).

The Difficulty

On a single node, atomic commit is relatively simple: the storage engine writes a commit record to disk (source: chapter9, p. 354). In a distributed system, it’s more complicated:

  • Some nodes may successfully commit, while others fail (e.g., due to a constraint violation or network failure) (source: chapter9, p. 354).
  • A transaction commit must be irrevocable: once a transaction is committed, it cannot be retracted (source: chapter9, p. 355).

Two-Phase Commit (2PC)

The most common algorithm for distributed atomic commit is two-phase-commit (2PC) (source: chapter9, p. 355). It uses a coordinator to manage the process.

Distributed Transactions

Atomic commit is the key problem in distributed-transactions, which involve multiple nodes, partitions, or even different database technologies (heterogeneous transactions) (source: chapter9, p. 360).

Atomic Commit vs. Consensus

The atomic commit problem is slightly different from the general consensus problem (source: chapter9, p. 353, footnote):

  • In consensus, nodes propose values and the system decides on one of them.
  • In atomic commit, every participant must vote to commit; if even one participant needs to abort, everyone must abort.