[JBoss JIRA] (ISPN-2077) Conflicting transactions are not properly aborted on non-transactional caches that use batching (DummyTransaction)
by Adrian Nistor (JIRA)
Adrian Nistor created ISPN-2077:
-----------------------------------
Summary: Conflicting transactions are not properly aborted on non-transactional caches that use batching (DummyTransaction)
Key: ISPN-2077
URL: https://issues.jboss.org/browse/ISPN-2077
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.5.FINAL
Environment: jdk 1.6.0_32, Fedora 16
Reporter: Adrian Nistor
Assignee: Adrian Nistor
Priority: Minor
Transaction manager silently aborts transaction commit due to write skew conflicts with other concurrent TX but does not throw RollbackException from TransactionManager.commit() as mandated by JTA spec. This only happens for a non-transactional cache. Tx for non-transactional caches are supported via DummyTransactionManager/DummyTransaction which seems to behave quite differently than JBoss TM and the JTA spec.
I've done a simple test. One non-transactional cache with batching, optimistic locking, simple versioning and write skew check. I use explicit manual transaction demarcation. N threads attempt to remove the same key concurrently and I count how many succeeded to remove (ie. remove(key,value) returned true) and also commit the TX successfully. I expect 1 but it turns out there are more successes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-2076) Detected write skew errors are logged as ERROR
by Sanne Grinovero (JIRA)
Sanne Grinovero created ISPN-2076:
-------------------------------------
Summary: Detected write skew errors are logged as ERROR
Key: ISPN-2076
URL: https://issues.jboss.org/browse/ISPN-2076
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.5.CR1
Reporter: Sanne Grinovero
Assignee: Mircea Markus
Priority: Minor
Fix For: 5.1.5.FINAL, 5.2.0.ALPHA1
A simple write skew check failure is logged as a critical error in org.infinispan.interceptors.InvocationContextInterceptor:146
This should be reported at most as DEBUG (but still re-thrown to the invoker)
{quote}
(main) ISPN000136: Execution error
org.infinispan.CacheException: Detected write skew - concurrent removal of entry!
at org.infinispan.container.entries.RepeatableReadEntry.performLocalWriteSkewCheck(RepeatableReadEntry.java:75)
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-1969) Nullpointer Exception when NON_TRANSACTIONAL caching
by Roland Csupor (JIRA)
Roland Csupor created ISPN-1969:
-----------------------------------
Summary: Nullpointer Exception when NON_TRANSACTIONAL caching
Key: ISPN-1969
URL: https://issues.jboss.org/browse/ISPN-1969
Project: Infinispan
Issue Type: Bug
Components: Cache Server, Configuration, Spring integration
Affects Versions: 5.1.3.FINAL
Reporter: Roland Csupor
Assignee: Manik Surtani
Priority: Critical
I am using infinispan mixed. Non transactional spring cache and transactional L1 cache.
Spring cache region config looks like this:
{noformat}
<namedCache name="springCache">
<transaction transactionMode="NON_TRANSACTIONAL"/>
<eviction maxEntries="100" strategy="NONE" />
<expiration lifespan="3600000" wakeUpInterval="600000" />
<invocationBatching enabled="false" />
<storeAsBinary enabled="true" storeKeysAsBinary="true" storeValuesAsBinary="true"/>
</namedCache>
{noformat}
My global configuration is:
{noformat}
<global>
<evictionScheduledExecutor
factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
<properties>
<property name="threadNamePrefix" value="EvictionThread" />
</properties>
</evictionScheduledExecutor>
<globalJmxStatistics allowDuplicateDomains="true"
enabled="true" jmxDomain="org.infinispan" cacheManagerName="SampleCacheManager" />
</global>
{noformat}
And default is:
{noformat}
<default>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="5000" useLockStriping="false" />
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="false" syncCommitPhase="false" useEagerLocking="false"
eagerLockSingleNode="false" lockingMode="OPTIMISTIC" autoCommit="false" transactionMode="TRANSACTIONAL" />
<jmxStatistics enabled="true" />
<invocationBatching enabled="true" />
</default>
{noformat}
Actually I get NullPointerException:
{noformat}
java.lang.NullPointerException: null
at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:72) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:95) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:60) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.CacheImpl.get(CacheImpl.java:272) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.CacheImpl.get(CacheImpl.java:264) ~[infinispan-core-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.infinispan.spring.provider.SpringCache.get(SpringCache.java:74) ~[infinispan-spring-5.1.3.FINAL.jar:5.1.3.FINAL]
at org.springframework.cache.interceptor.CacheAspectSupport.inspectCacheables(CacheAspectSupport.java:310) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:198) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-2072) After a write skew check failure applications can't rollback
by Sanne Grinovero (JIRA)
Sanne Grinovero created ISPN-2072:
-------------------------------------
Summary: After a write skew check failure applications can't rollback
Key: ISPN-2072
URL: https://issues.jboss.org/browse/ISPN-2072
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.5.CR1
Reporter: Sanne Grinovero
Assignee: Mircea Markus
Priority: Critical
Fix For: 5.1.5.FINAL
When having this configuration:
{code:xml}
<transaction
transactionMode="TRANSACTIONAL"
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"/>
<locking isolationLevel="REPEATABLE_READ" writeSkewCheck="true" />
{code}
When a write skew check is failed, the following exception is propagated to the user code:
{quote}
org.infinispan.CacheException: Detected write skew - concurrent removal of entry!
at org.infinispan.container.entries.RepeatableReadEntry.performLocalWriteSkewCheck(RepeatableReadEntry.java:75)
at org.infinispan.container.entries.RepeatableReadEntry.copyForUpdate(RepeatableReadEntry.java:52)
at org.infinispan.container.EntryFactoryImpl.wrapEntryForRemove(EntryFactoryImpl.java:133)
at org.infinispan.interceptors.EntryWrappingInterceptor.visitRemoveCommand(EntryWrappingInterceptor.java:158)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:72)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitRemoveCommand(OptimisticLockingInterceptor.java:173)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:72)
{quote}
The use code is catching the exception, and attempts a rollback. The rollback fails with:
{quote}
WARN [jta] (main) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffac11823e:8e2d:4fc39246:2669f, node_name=1, branch_uid=0:ffffac11823e:8e2d:4fc39246:266a4, subordinatenodename=null, eis_name=0 > (TransactionXaAdapter\{localTransaction=LocalXaTransaction\{xid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffac11823e:8e2d:4fc39246:2669f, node_name=1, branch_uid=0:ffffac11823e:8e2d:4fc39246:266a4, subordinatenodename=null, eis_name=0 >} LocalTransaction\{remoteLockedNodes=null, isMarkedForRollback=false, transaction=TransactionImple < ac, BasicAction: 0:ffffac11823e:8e2d:4fc39246:2669f status: ActionStatus.ABORTING >, lockedKeys=null, backupKeyLocks=null, viewId=-1} org.infinispan.transaction.xa.LocalXaTransaction@99a9}) failed with exception code XAException.XAER_NOTA
javax.transaction.xa.XAException
at org.infinispan.transaction.xa.TransactionXaAdapter.getLocalTransactionAndValidateImpl(TransactionXaAdapter.java:245)
at org.infinispan.transaction.xa.TransactionXaAdapter.rollback(TransactionXaAdapter.java:134)
at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:345)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2876)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2855)
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1618)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:118)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:188)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1247)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:134)
{quote}
as in _org.infinispan.transaction.xa.TransactionXaAdapter.getLocalTransactionAndValidateImpl(Xid, XaTransactionTable)_ the operation
{code}
LocalXaTransaction localTransaction = txTable.getLocalTransaction(xid);{code}
returns *null*.
This happens as the method _org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(InvocationContext, WriteCommand)_ is removing a reference to the local transaction on line *218*
I've commented the cleanup line and it fixes my problem, I'm now correctly able to rollback transactions and try again.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months