Two phase commit: what happens if the coordinator dies between sending two confirmations

206 views Asked by At

I am trying to understand how two phase commit protocol works and I hit an issue that is unclear to me.

Let's say that the coordinator sent two requests for commit and both recipients acknowledged. Now it starts sending commit requests, but between the first and second request the coordinator has a failure. This means that the first recipient will commit, while the second one won't. Doesn't it leave the distributed system in an inconsistent state? How is such a thing solved?

1

There are 1 answers

0
mithuntnt On

https://www.cs.rutgers.edu/~pxk/417/notes/content/transactions.html

Two-phase commit is not fault tolerant because it uses a single coordinator whose failure can cause the protocol to block.