0

I read some tutorials on two-phase commit https://www.cs.cmu.edu/~dga/15-440/F10/lectures/Concurrency-Control.pdf [Slide 27]

It seems that, when there are multiple shards [participants], it needs 4 message delays for the coordinator to commit the transaction: (1) Cooridnator sends txn to shards (2) Shards reply to Coordinator "Prepared" (3) Coordinator sends Commit to Shards (4) Shards execute the txn and reply the execution result to coordinator

I am wondering, is it okay to merge (2) and (3) into one step: Shards broadcast "Prepared" to the other shards, after the shard collects the "Prepared" acknowledge from all the other shards, it can execute the txn and send the reply to Coordinator. In this case, only 3 message delays are required to complete the txn.

But I havn't seen any tutorials talking about this, is there any special consideration of the 4-message-delay design?

steamgjk
  • 11
  • 1

0 Answers0