A three-phase commit protocol has the following parts:
Phase 1: is the same as for two-phase commit.
Phase 2: the coordinator collects the votes and makes a decision; if it is No, it aborts and informs
participants that voted Yes; if the decision is Yes, it sends a preCommit request to all the participants.
participants that voted Yes wait for a preCommit or doAbort request. They acknowledge preCommit
requests and carry out doAbort requests.
Phase 3: the coordinator collects the acknowledgments. When all are received, it Commits and sends
doCommit to the participants. participants wait for a doCommit request. When it arrives they Commit.
Explain how this protocol avoids delay to participants during their ‘uncertain’ period due to the failure of the
coordinator or other participant
What will be an ideal response?
In the two-phase commit protocol: the ‘uncertain’ period occurs because a worker has voted yes but has not
yet been told the outcome. (It can no longer abort unilaterally).
In the three-phase commit protocol: the workers ‘uncertain’ period lasts from when the worker votes yes until
it receives the PreCommit request. At this stage, no other participant can have committed. Therefore if a group
of workers discover that they are all ‘uncertain’ and the coordinator cannot be contacted, they can decide
unilaterally to abort.
You might also like to view...
An envelope size is selected from the ________ dialog box
A) Envelope Options B) Mail merge options C) Mailings option D) Size options
What is the value of x after the following statements?
int x, y, z; y = 10; z = 3; x = y * z + 3; a. Garbage b. 60 c. 30 d. 33