Content deleted Content added
Alter: journal. | You can use this tool yourself. Report bugs here. | via #UCB_Gadget |
No edit summary |
||
Line 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]]).
==Solution==
The pre-commit phase introduced above helps us to recover from the case when a participant failure or both coordinator and participant node failure during commit phase. When the recovery coordinator takes over after coordinator failure during commit phase of [[two-phase commit]], the new pre-commit comes handy as follows: On querying participants, if it learns that some nodes are in commit phase then it assumes that previous coordinator before crashing has made the decision to commit. Hence it can shepherd the protocol to commit. Similarly, if a participant says that it doesn’t receive PrepareToCommit message, then the new coordinator can assume that the previous coordinator failed even before it started the PrepareToCommit phase. Hence it can safely assume no other participant would have committed the changes and hence safely abort the transaction.
==Extensions==
|