In the context of distributed transactions, what problem does the Two-Phase Commit (2PC) protocol solve, and what is its main weakness?
Correct! Well done.
Incorrect.
The correct answer is C) It coordinates a commit decision across multiple nodes so all participants either commit or abort together, but a coordinator failure after the prepare phase can leave participants blocked holding locks indefinitely
Correct Answer
It coordinates a commit decision across multiple nodes so all participants either commit or abort together, but a coordinator failure after the prepare phase can leave participants blocked holding locks indefinitely
2PC has a prepare phase (participants vote to commit or abort) and a commit phase (coordinator broadcasts the final decision). If the coordinator crashes after participants vote "yes" but before sending the decision, those participants remain blocked holding locks — the protocol's well-known "blocking problem," which Paxos/Raft-based commit protocols aim to avoid.