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?
https://www.cs.rutgers.edu/~pxk/417/notes/content/transactions.html