Under the three-phase commit protocol, discuss how the coordinator and participants would recover following a failure. Consideration should be given to the various stages of the commit protocol.
Coordinator Failure
Participant Failure
What will be an ideal response?
Coordinator Failure
1. Failure in INITIAL state. The coordinator has not yet started the commit procedure.
Recovery in this case starts the commit procedure.
2. Failure in WAITING state. The coordinator has sent the prepare message and although
has not received all responses, the coordinator has not received an abort response. In this
case, recovery restarts the commit procedure.
3. Failure in DECIDED state. The coordinator has instructed the participants to globally
abort or commit the transaction. On restart, if the coordinator has received all
acknowledgements, it can complete successfully. Otherwise, it has to initiate the
termination protocol discussed above.
4. Failure in PRE-COMMITTED state. The coordinator has instructed the participants to
pre-commit the transaction. On restart, if the coordinator has received all
acknowledgements, it can send the global commit message. Otherwise, it can send the
pre-commit message again.
Participant Failure
The objective of the recovery protocol for a participant is to ensure that a participant process on
restart performs the same action as all other participants and that this restarting can be done
independently (i.e. without the need to consult either the coordinator or the other participants).
1. Failure in INITIAL state. The participant has not yet voted on the transaction. Therefore,
on recovery, it can unilaterally abort the transaction, as it would have been impossible
for the coordinator to have reached a global commit decision without this participants
vote.
2. Failure in PREPARED state. The participant has sent its vote to the coordinator. In this
case, recovery is via the termination protocol discussed above.
3. Failure in ABORTED/COMMITTED states. Participant has completed the transaction.
Therefore, on restart, no further action is necessary.
4. Failure in PRE-COMMITTED state. Participant informs coordinator and waits for
global commit message.
You might also like to view...
What is a hash collision?
a. It's when an object that we want to store in the data structure produces a hash assigning it to an already occupied slot. b. It's when an object that we want to store in the data structure produces the same hash value as an already stored object. c. It's when two objects are equal. d. None of the above
Which of the following should be used to make the code snippet work for students who get any score between 0 – 100?
``` var grade = 0; var score = parseInt("What's the score?"); if (score < 70) grade = "F"; else if ( ??? ) grade = "C"; else if (grade >= 85) grade = "A"; ``` a. ``` grade > 70 && grade < 85 ``` b. ``` grade >= 70 && <= 85 ``` c. ``` grade >= 70 ``` d. ``` grade < 85 ```
Which of the following uses legacy code?
A. layout tables B. liquid layout C. fixed-width layout D. elastic layout
Each site link bridge is a chain of site links that enables any two _________________ to communicate directly with each other, whether or not they are directly connected with a site link
a. Servers b. Users c. Organizational units d. Domain controllers