I read the online document here and for hours of researching and trying things out I still have a question need explanation.
The documentation says that there are two classes of failures, which for me there should be more. Failures can happen in any time when application send a query to database. For example, in section Apply Transaction to Both Accounts, what if after updating the account A, the database server failed, so account B didn't get updated. The query for updating account B was ignored. Next, the database server happens to be restarted immediately after the query for updating B was failed to execute. That means queries from Set Transaction State to Committed section all the way down are still executed successfully.
If that is the case, we could get an inconsistent database.
Could you point out what is missing here with my above thinking?