11.3 About Transaction Recovery
The transaction coordinator server resumes the transactions that were in progress when server the restarts after a failure.
Every time the transaction coordinator server restarts, it goes through all the in-progress transactions stored in the transaction store and restarts the ongoing transactions. The recovery depends on the data that is available in the transaction store. The transaction store should retain information about the earlier transactions even after the transaction coordinator crashes or restarts. If you have set up etcd or Oracle Database for MicroTx to store the transaction data, then you can obtain information about the in-progress transactions and transaction details after the coordinator restarts. However, if you haven't set up a separate transaction store and are using internal memory to store the transaction details, then all the stored information is lost after the coordinator crashes or restarts.
MicroTx recovers in-progress transactions, based on the data available in the transaction store, for transactions which are in the following states:
Transaction protocol | Transaction status | As part of transaction recovery, the transaction coordinator... |
---|---|---|
XA | Preparing |
rolls back the transactions |
XA | Rolling back |
rolls back the transactions |
XA | Committing |
resends the prepare and commit commands and retries to commit the transactions successfully |
Saga | Closing |
reissues the close command to close the transaction |
Saga | Canceling |
reissues the cancel command to cancel the transaction |
TCC | Confirming |
reissues the confirm command to confirm the transaction |
TCC | Canceling |
reissues the cancel command to cancel the transaction |
Additionally, for XA transaction protocol, the transaction coordinator dynamically recovers the transactions which are not committed. See About Dynamic Recovery for XA Transactions.
Parent topic: Manage the Transaction Coordinator