Resolution: Won't Do
git clone http: //git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git export JBOSS_HOME=... (downloadable at http: //download.eng.brq.redhat.com/devel/candidates/JBEAP/) DS_PROPS= "-Dds0.db=oracle -Dds0.jdbc.driver.url=http: //www.qa.jboss.com/jdbc-drivers-products/EAP/7.1.0/postgresql94/jdbc4/postgresql-9.4.1209.jar -Dds0.jdbc.xa-class=org.postgresql.xa.PGXADataSource -Dds0.jdbc.url=jdbc:postgresql://gen-vm006.mw.lab.eng.bos.redhat.com:5432/crashrec -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec -Dds0.jdbc.driver.jar=postgresql-driver.jar" mvn clean verify -am -pl jbossts -DfailIfNoTests= false -Djbossts.noJTS -Dtest=JPAProxyCrashRecoveryTestCase#prepareHalt
I do experience trouble - or maybe different behavior against older version of Narayana - with forgetting transaction log when failure is caused by jdbc driver throws XAException.XAER_RMERR during prepare phase of 2PC.
The test scenario is following
- prepare db/jms XA
- stop connection to db/jms
- prepare test XA
- commit db/jms XA (connection is down - jdbc driver throws XAException.XAER_RMERR)
- client gets javax.transaction.TransactionRolledbackException from server side
- trying to abort transaction
- rollback of db resource but connection is down
- rolback test XA
- connection is started again
- expected behaviour: periodic recovery -> rollback db XA
For current Narayana version (tested with 5.3.5 and 5.4.1.snapshot) the periodic recovery does not rolled back the participant during recovery cycle.
For Narayana 5.3.3.Final periodic recovery votes for rollback (ROLLBACK).
Narayan 5.3.5.Final ends with voting for doing nothing (JTATransactionLogXAResourceOrphanFilter.LEAVE_ALONE).
It seems to me that's caused by fact that directly after transaction commit fails (because of not existing connection) for previous version of Narayana transaction record about participant was removed from txn log . But in current version the transaction record is left in log and orphan filters do not vote for roll-backing in bottom-up phase later on.