Status: Closed (View Workflow)
Affects Version/s: 5.3.3.Final
Fix Version/s: None
Steps to Reproduce:Crashrecovery testsuite could be used for reproducing the issue git clone http: //git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git export JBOSS_HOME=... mvn clean verify -am -pl jbossts -DfailIfNoTests= false -fn -Djbossts.noJTS -Dtest=JcaInflowTransactionTestCase#jvmCrashAfterPrepare
When EIS RAR manages inflow transaction through XATerminator calls and jvm of TM is crashed at the start of commit phase then EIS can't recover all transaction participants.
Expected flow of the case would be
- enlist two participants of inflow transaction - that means TM manages subordinate transaction and accepts orders from EIS RAR
- TM receives commit order by EIS RAR call XATerminator.commit
- TM prepares both participants
- end phase prepares, start phase commits
- JVM crashes
- app server is restarted again
- EIS system repeats commit call as subordinate txn was not finished
- TM calls commit on both participants to finish the transaction
This scenario has two troubles in current implementation
If app server is restarted (after jvm crash happened) and EIS calls commit right after the start there is thrown XAER_RMFAIL when XATerminator.commit is called.
For the commit have got a real effect on in-doubt transaciton there needs to be called recovery first. From that point in time the in-doubt inflow transaction is "available" for EIS RAR XATerminator.commit call. But there is another issue. Transaction was stopped with two participants prepared. But after commit is called from XATerminator only one XAResource is committed. The other one is left and forgotten. As the transaction itself is resolved as finished (thus removed from log store) there is no way to get to the remaining in-doubt participant - at least with help of jboss cli tooling.
(The reason could be that both XA resources shared the xid, as discussed in other place, TM does not rights to change xid and it needs to reuse existing one provided by EIS to all the work)