ERROR WriteSkewException: Write skew detected on key WrappedByteArray in RHDG client

Solution Verified - Updated -

Issue

CacheException when using optimistic configuration on cache:

2020-03-25 00:32:49,647 WARN  [org.wildfly.clustering.web.infinispan] (SessionExpirationScheduler - 1) WFLYCLWEBINF0004: Failed to expire session im0RyVZ6ZiV4foIH0a0PgTjWRq2pzxG2-_SpxIMW: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=8620945 returned server error (status=0x85): javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
org.infinispan.commons.CacheException: Could not prepare.
javax.transaction.xa.XAException
org.infinispan.transaction.WriteSkewException: Write skew detected on key WrappedByteArray{bytes=[B0x0301FE03FF84021E..[38], hashCode=-525647501} for transaction LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, lockedKeys=[WrappedByteArray{bytes=[B0x0301FE03FF84021E..[38], hashCode=-525647501}], backupKeyLocks=[], topologyId=72, stateTransferFlag=null} org.infinispan.transaction.synchronization.SyncLocalTransaction@1461edc5
    at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:343)
    at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:132)
    at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:118)
    at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
    at org.infinispan.client.hotrod.impl.operations.AbstractKeyOperation.sendKeyOperation(AbstractKeyOperation.java:54)
    at org.infinispan.client.hotrod.impl.operations.RemoveOperation.executeOperation(RemoveOperation.java:28)
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
    at org.infinispan.client.hotrod.impl.RemoteCacheImpl.remove(RemoteCacheImpl.java:526)
    at org.infinispan.persistence.remote.RemoteStore.delete(RemoteStore.java:183)
    at org.infinispan.persistence.manager.PersistenceManagerImpl.deleteFromAllStores(PersistenceManagerImpl.java:415)
    at org.infinispan.interceptors.CacheWriterInterceptor.visitRemoveCommand(CacheWriterInterceptor.java:158)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:186)
    at org.infinispan.interceptors.CacheLoaderInterceptor.visitRemoveCommand(CacheLoaderInterceptor.java:171)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:497)
    at org.infinispan.interceptors.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:562)
    at org.infinispan.interceptors.EntryWrappingInterceptor.visitRemoveCommand(EntryWrappingInterceptor.java:257)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113)
    at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:48)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:95)
    at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:40)
    at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitRemoveCommand(AbstractLockingInterceptor.java:74)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.CacheMgmtInterceptor.visitRemoveCommand(CacheMgmtInterceptor.java:208)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
    at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
    at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
    at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:48)
    at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63)
    at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:336)
    at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1672)
    at org.infinispan.cache.impl.CacheImpl.removeInternal(CacheImpl.java:557)
    at org.infinispan.cache.impl.CacheImpl.remove(CacheImpl.java:549)
    at org.infinispan.cache.impl.DecoratedCache.remove(DecoratedCache.java:458)
    at org.infinispan.cache.impl.AbstractDelegatingCache.remove(AbstractDelegatingCache.java:296)
    at org.wildfly.clustering.web.infinispan.session.InfinispanSessionMetaDataFactory.remove(InfinispanSessionMetaDataFactory.java:113)
    at org.wildfly.clustering.web.infinispan.session.InfinispanSessionMetaDataFactory.remove(InfinispanSessionMetaDataFactory.java:102)
    at org.wildfly.clustering.web.infinispan.session.InfinispanSessionMetaDataFactory.remove(InfinispanSessionMetaDataFactory.java:36)
    at org.wildfly.clustering.web.infinispan.session.InfinispanSessionFactory.remove(InfinispanSessionFactory.java:87)
    at org.wildfly.clustering.web.infinispan.session.InfinispanSessionFactory.remove(InfinispanSessionFactory.java:38)
    at org.wildfly.clustering.web.infinispan.session.ExpiredSessionRemover.remove(ExpiredSessionRemover.java:53)
    at org.wildfly.clustering.web.infinispan.session.ExpiredSessionRemover.remove(ExpiredSessionRemover.java:35)
    at org.wildfly.clustering.web.infinispan.session.SessionExpirationScheduler$ExpirationTask.run(SessionExpirationScheduler.java:140)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
  • Red Hat Data Grid (RHDG)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content