Content deleted Content added
Hooperbloob (talk | contribs) →Disadvantages: spell out numbers < 10 |
Removed false statements. This includes the whole description of the protocol which seems like original research and is unsound (none of the cited sources match the description). Also removed the claim that 3PC "places an upper bound on the time required before a transaction either commits or aborts". This is theoretically impossible. |
||
Line 1:
In [[computer networking]] and [[database]]s, the '''three-phase commit protocol''' ('''3PC''')<ref name=3PC>{{cite
| last = Skeen
| first = Dale
| title = A
| date = February 1982
| institution = Department of Computer Science, Cornell University
| url = https://ecommons.cornell.edu/handle/1813/6323
}}</ref> is a [[distributed algorithm]] which lets all nodes in a [[distributed system]] agree to [[Commit (data management)|commit]] a [[database transaction|transaction]]. It is a refinement of the [[two-phase commit protocol]] (2PC) which is more resilient to failures.
==Motivation==
Line 32 ⟶ 12:
The three-phase commit protocol eliminates this problem by introducing the Prepared to commit state. If the coordinator fails before sending preCommit messages, the cohort will unanimously agree that the operation was aborted. The coordinator will not send out a doCommit message until all cohort members have '''ACK'''ed that they are '''Prepared to commit'''. This eliminates the possibility that any cohort member actually completed the transaction before all cohort members were aware of the decision to do so (an ambiguity that necessitated indefinite blocking in the [[two-phase commit protocol]]).
==Extensions==
Using Skeen's original three-phase commit protocol, it is possible that a quorum becomes connected without being able to make progress (this is not a deadlock situation; the system will still progress if the network partitioning is resolved). Keidar and Dolev's E3PC<ref name=E3PC>{{cite journal|last=Keidar|first=Idit|author2=Danny Dolev |title=Increasing the Resilience of Distributed and Replicated Database Systems|journal=Journal of Computer and System Sciences (JCSS)|volume=57|issue=3|date=December 1998|pages=309–324|▼
url=http://webee.technion.ac.il/~idish/Abstracts/jcss.html|doi=10.1006/jcss.1998.1566}}</ref>
==Disadvantages==
▲Keidar and Dolev's E3PC<ref name=E3PC>{{cite journal|last=Keidar|first=Idit|author2=Danny Dolev |title=Increasing the Resilience of Distributed and Replicated Database Systems|journal=Journal of Computer and System Sciences (JCSS)|volume=57|issue=3|date=December 1998|pages=309–324|
▲url=http://webee.technion.ac.il/~idish/Abstracts/jcss.html|doi=10.1006/jcss.1998.1566}}</ref> algorithm eliminates this disadvantage.
The protocol requires at least three round trips to complete, needing a minimum of three round trip times (RTTs). This is potentially a long latency to complete each transaction.
|