Why are there so many questions submitted in the second phase? why are they used in many places?

as a rookie, recently, when I learned about distributed consistency-related solutions, I found a very painful problem. Many places say that 2pc and 3PC are used, but there are still many problems with two-phase commit. Since this is the case, why do many places say two-phase commit as a solution when it comes to distributed transactions to ensure data consistency?
and after learning about 2pc, I feel that 2pc seems to be in vain.
I don"t understand. Can the solution of so many problems be used as a production environment?

The internal and external XA of

mysql is 2PC.
2pc is simpler than both raft and Paxos.
so it's up to you to make your own decisions based on input and output.

Menu