PolarDB-X 1.0 uses two-phase commit (2PC) to guarantee the atomicity and consistency of distributed transactions.
How it works
2PC splits each distributed transaction into two sequential phases:
Prepare phase — Each data node (ApsaraDB RDS for MySQL instance) acquires all resources needed to commit the transaction, including resource locking and logging.
Commit phase — After every data node has successfully completed the prepare phase, the PolarDB-X 1.0 server, acting as the transaction manager, sends a commit request to each data node. Each node then commits its portion of the transaction.