Skip to content

Two-phase commit protocol

A distributed atomic-commit protocol in which a coordinator first collects durable prepare votes and then tells every participant to commit or abort the transaction.

Version
v1 · 2026-09-08 · History
Domain-specific #
7292
Origin domain
distributed transactions and databases
Subdomain
distributed transactions and databases

Core Idea

2PC ensures agreement and atomicity under its failure model but can block when prepared participants cannot learn the coordinator's decision; durable logs, recovery rules and presumed-abort or commit variants shape operation. In phase one participants validate and log readiness before voting; if all vote yes the coordinator durably records commit, otherwise abort, and phase two distributes the decision until participants acknowledge and release resources. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

Scope of Application

Two-phase commit protocol belongs to distributed transactions and databases and is useful where the analyst can specify the typed distributed transactions and databases carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate the transaction and participants, coordinator and membership, resource managers, prepare request, local validation and locks, yes and no votes, durable log records, unanimity rule, commit and abort decision, phase-two messages and acknowledgments, timeouts, crash and recovery states, duplicate handling, heuristic decisions, blocking condition and relation to consensus are explicit.

Clarity

The abstraction clarifies a crowded vocabulary by making the transaction and participants, coordinator and membership, resource managers, prepare request, local validation and locks, yes and no votes, durable log records, unanimity rule, commit and abort decision, phase-two messages and acknowledgments, timeouts, crash and recovery states, duplicate handling, heuristic decisions, blocking condition and relation to consensus are explicit the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Two-phase commit protocol. Two-phase commit protocol compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed distributed transactions and databases carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem. 2.

Knowledge Transfer

Knowledge transfers strongly among subfields of distributed transactions and databases because they reuse the typed distributed transactions and databases carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, In phase one participants validate and log readiness before voting; if all vote yes the coordinator durably records commit, otherwise abort, and phase two distributes the decision until participants acknowledge and release resources., and type the carrier, state every parameter and convention in the definition, test that the transaction and participants, coordinator and membership, resource managers, prepare request, local validation and locks, yes and no votes, durable log records, unanimity rule, commit and abort decision, phase-two messages and acknowledgments, timeouts, crash and recovery states, duplicate handling, heuristic decisions, blocking condition and relation to consensus are explicit, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Two-phase commit protocolParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Two-phasecommit protocolDOMAINPrime abstraction: Coordination — is a kind ofCoordinationPRIME

Current abstraction Two-phase commit protocol Domain-specific

Parents (1) — more general patterns this builds on

  • Two-phase commit protocol is a kind of Coordination Prime

    The proposed strict upward parent is prime:coordination.

Hierarchy paths (5) — routes to 4 parentless roots

Neighborhood in Abstraction Space

Two-phase commit protocol sits in a moderately populated region (55th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Concurrency, Transactions & Process Coordination (20 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-09-08