We are using 3PC (three-phase commitment) for a distributed transaction. There are 4 nodes, A, B, C, D, where A is the coordinator.
- A received OK from all others and sent the prepare-to-commit message to them.
- While C and D received this message and moved to prepared state, B crashes and doesn't received this message (thus remaining in the wait state).
- A timeouts on B and sends abort to all others, but only D receives the abort message, while C crashes before receiving the abort message.
Now the question is: What will C do after recovery? According to http://courses.cs.vt.edu/~cs5204/fall00/distributedDBMS/sreenu/3pc.html, C will commit upon recovery following the failure transition instead of aborting as D does. Won't that result in an inconsistent state? Or C has some mechanism to detect that the transaction in an aborted state?