ExercisesDistributed Systems Consensus › Distributed Transactions

Distributed Transactions

5 questions · Distributed Systems Consensus

1. A coordinator node asks all participating services if they are prepared to commit, then — only if all agree — sends the final commit command. What protocol is this?
2. If the coordinator in a 2PC protocol crashes after sending prepare but before sending commit, participating nodes are blocked waiting. What is this problem called?
3. Instead of a single distributed transaction, the payment saga uses a sequence of local transactions: charge card → reserve inventory → confirm order. If inventory reservation fails, the saga refunds the card. What transaction design pattern is this?
4. A compensating transaction reverses the effect of a previously completed saga step when a later step fails. Which statement about compensating transactions is correct?
5. A transaction coordinator instructs all databases to lock resources and prepare to commit. One database confirms, but the third database crashes before responding. What must the coordinator do?

Exercise complete!

out of 5 questions