Explain the usage scenarios for distributed transactions

  java, question

Recently, I saw something about distributed transactions.
There is one question: Most scenarios explaining distributed transactions are that multiple libraries cannot control transactions uniformly, and then distributed transactions are introduced to be submitted uniformly.
But even if it is not handled like this, it will be treated as two ordinary interfaces. If one receives the rollback information and the other interface rolls back itself, will it be Can’t??
It seems that with the so-called 2-segment 3-segment distributed control, it feels that one is parallel and the other is serial. Is this the only difference?

Transactions need to ensure the integrity of data under any circumstances. “if one receives the rollback information, the other interface is rolling back itself” does not conform to the atomicity of the transaction. For example, in case of network or service or hardware failure.