Well, it took me a while to figure this out. The answer is NO, if we disable com.atomikos.icatch.enable_logging, we cannot guarantee the consistency of transactions, and we can get some things fixed in one database, but not fixed in another.
In transaction XA, we have two main roles. Transaction Coordinator and Transaction Participant. Two transaction logs are involved here. The Coordinator’s transaction log on one side and the participant’s transaction log.
What happens is that first all participants in the XA transaction register for the coordinator. XA_START then follows the write phase, when all SQL statements are sent to different participants. X_END marks the end of this process and the point where commit is invoked from the point of view of the application.
At this point, the Transaction Coordinator takes control of the backstage. PREPARE message is sent to each participant. Each participant answers READ TO COMMIT or ABORT, the message is sent to the logs. If all participants respond with COMMIT. A challenge call is sent to each member.
This means that if a failure occurs and transaction logging is disabled on the coordinator side, that is, Atomikos, this is the real chance that one participant will succeed in COMMIT and the other member will not be able to commit.
Essentially, com.atomikos.icatch.enable_logging is mandatory if you want to guarantee a consistent state.
source share