Content deleted Content added
Undid revision 521026346 by 115.64.190.115 (talk) |
m WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. - using AWB (8855) |
||
Line 14:
}}</ref> is a [[distributed algorithm]] which lets all nodes in a [[distributed system]] agree to [[commit]] a [[database transaction|transaction]]. Unlike the [[two-phase commit protocol]] (2PC) however, 3PC is non-blocking. Specifically, 3PC places an upper bound on the amount of time required before a transaction either commits or [[Abort (computing)|aborts]]. This property ensures that if a given transaction is attempting to commit via 3PC and holds some [[lock (computer science)|resource locks]], it will release the locks after the timeout.
3PC was originally described by [[Dale Skeen]] and [[Michael Stonebraker]] in their paper, “A Formal Model of Crash Recovery in a Distributed System”.<ref name=3PC />
==Protocol Description==
Line 24:
# The coordinator receives a transaction request. If there is a failure at this point, the coordinator aborts the transaction (i.e. upon recovery, it will consider the transaction aborted). Otherwise, the coordinator sends a '''canCommit?''' message to the cohorts and moves to the waiting state.
# If there is a failure, timeout, or if the coordinator receives a '''No''' message in the waiting state, the coordinator aborts the transaction and sends an '''abort''' message to all cohorts. Otherwise the coordinator will receive '''Yes''' messages from all cohorts within the time window, so it sends '''preCommit''' messages to all cohorts and moves to the prepared state.
# If the coordinator succeeds in the prepared state, it will move to the commit state. However if the coordinator times out while waiting for an acknowledgement from a cohort, it will abort the transaction. In the case where all acknowledgements are received, the coordinator moves to the commit state as well.
===Cohort===
Line 61 ⟶ 60:
==See also==
*[[Two-phase commit protocol]]
[[Category:Data management]]
|