-
Bug
-
Resolution: Won't Do
-
Major
-
4.1.0.Final
-
None
If an error occurs during the commit-phase of the Infinispan transaction (NON_XA, pessimistic, READ_COMMITTED) the Infinispan cache does not get updated and instead throws the following exception:
09:59:42,512 WARN [com.arjuna.ats.jta] (default task-34) ARJUNA016029: SynchronizationImple.afterCompletion - failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, lockedKeys=null, backupKeyLocks=null, topologyId=0, isFromStateTransfer=false} org.infinispan.transaction.synchronization.SyncLocalTransaction@6} org.infinispan.transaction.synchronization.SynchronizationAdapter@25 with exception: org.infinispan.commons.CacheException: Could not commit. at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:60) [infinispan-core-6.0.2.Final.jar:6.0.2.Final] at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:532) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1166) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:147) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:93) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)] at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequiresNew.intercept(TransactionalInterceptorRequiresNew.java:54) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]
This error does not change the status of the transaction (COMMITTED=7) and the modeshape transaction synchronization implementation proceeds with executing it's afterCommit() logic. No errors are returned to the application tier and the transaction appears to be successful which means the application reports the modification as successful to the user.
Subsequent attempt to access the changes in a new session/Tx fail because the changes are not in the Infinispan cache.
This appears to be expected behavior when using synchronizations and an error occurs during the commit-phase. It should not impact the transactions status and any other registered synchronizations should still be called. Given this the idea is to not perform any operations in the commit phase that are likely to fail, instead these should be done in the prepare phase.
The problem is that Infinispan does it's writes to the cache stores (file/jdbc/etc) during the commit-phase and these do fail intermittently for a multitude of reasons (I've seen this when I exhaust my JDBC connection pool).
Given this is there anything that can be done in the Modeshape tier to verify a modification after the Tx commits and propagate an error to the application tier ?
- is related to
-
MODE-2420 Modeshape can potentially lose data because Infinispan Cache Stores do not participate in transactions
- Resolved