[ https://issues.apache.org/jira/browse/IGNITE-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maxim Muzafarov resolved IGNITE-9110. ------------------------------------- Resolution: Won't Fix > Tx commit hangs after cross-cache operations with LOCAL cache > ------------------------------------------------------------- > > Key: IGNITE-9110 > URL: https://issues.apache.org/jira/browse/IGNITE-9110 > Project: Ignite > Issue Type: Bug > Components: cache > Reporter: Ryabov Dmitrii > Priority: Minor > > Commit hangs when tx contains operations on LOCAL and PARTITIONED or > REPLICATED caches in some cases. Example: > {code:java} > public class LocalCacheFails extends GridCommonAbstractTest { > /** */ > public void testLocalCache() throws Exception { > IgniteEx ignite = startGrid(0); > IgniteCache<Integer, Integer> locCache = > ignite.createCache(getConfig(LOCAL)); > IgniteCache<Integer, Integer> partCache = > ignite.createCache(getConfig(PARTITIONED)); > try (Transaction tx = ignite.transactions().txStart(OPTIMISTIC, > SERIALIZABLE)) { > locCache.put(1, 1); > partCache.put(1, 1); > tx.commit(); // Fails here. > } > } > /** */ > private CacheConfiguration<Integer, Integer> getConfig(CacheMode > cacheMode) { > CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>(); > cfg.setCacheMode(cacheMode); > cfg.setName(cacheMode.name()); > cfg.setAtomicityMode(TRANSACTIONAL); > return cfg; > } > } > {code} > Stacktrace here: > {code:java} > [18:05:44] (err) Failed to execute compound future reducer: > GridNearTxFinishFuture > [futId=ff3264cd461-707c41df-7a8c-4067-8367-5d941df0aec1, tx=GridNearTxLocal > [mappings=IgniteTxMappingsImpl [], nearLocallyMapped=false, > colocatedLocallyMapped=true, needCheckBackup=null, hasRemoteLocks=false, > trackTimeout=false, lb=null, > thread=test-runner-#1%transactions.LocalCacheFails%, > mappings=IgniteTxMappingsImpl [], super=GridDhtTxLocalAdapter > [nearOnOriginatingNode=false, nearNodes=[], dhtNodes=[], explicitLock=false, > super=IgniteTxLocalAdapter [completedBase=null, sndTransformedVals=false, > depEnabled=false, txState=IgniteTxStateImpl > [activeCacheIds=[72607563,-887906071], recovery=false, txMap=[IgniteTxEntry > [key=KeyCacheObjectImpl [part=0, val=1, hasValBytes=true], cacheId=72607563, > txKey=IgniteTxKey [key=KeyCacheObjectImpl [part=0, val=1, hasValBytes=true], > cacheId=72607563], val=[op=CREATE, val=UserCacheObjectImpl [val=1, > hasValBytes=true]], prevVal=[op=CREATE, val=UserCacheObjectImpl [val=1, > hasValBytes=true]], oldVal=[op=NOOP, val=null], entryProcessorsCol=null, > ttl=-1, conflictExpireTime=-1, conflictVer=null, explicitVer=null, > dhtVer=null, filters=[], filtersPassed=false, filtersSet=true, > entry=GridLocalCacheEntry [super=GridCacheMapEntry [key=KeyCacheObjectImpl > [part=0, val=1, hasValBytes=true], val=CacheObjectImpl [val=null, > hasValBytes=true], ver=GridCacheVersion [topVer=144183944, > order=1532703942007, nodeOrder=1], hash=1, extras=null, flags=2]], > prepared=1, locked=false, nodeId=1068e98c-9c17-4fee-967b-8bbbb2700000, > locMapped=false, expiryPlc=null, transferExpiryPlc=false, flags=0, > partUpdateCntr=0, serReadVer=null, xidVer=GridCacheVersion [topVer=144183944, > order=1532703942006, nodeOrder=1]], IgniteTxEntry [key=KeyCacheObjectImpl > [part=1, val=1, hasValBytes=true], cacheId=-887906071, txKey=IgniteTxKey > [key=KeyCacheObjectImpl [part=1, val=1, hasValBytes=true], > cacheId=-887906071], val=[op=CREATE, val=UserCacheObjectImpl [val=1, > hasValBytes=true]], prevVal=[op=CREATE, val=UserCacheObjectImpl [val=1, > hasValBytes=true]], oldVal=[op=NOOP, val=null], entryProcessorsCol=null, > ttl=-1, conflictExpireTime=-1, conflictVer=null, explicitVer=null, > dhtVer=null, filters=[], filtersPassed=false, filtersSet=true, > entry=GridDhtCacheEntry [rdrs=[], part=1, super=GridDistributedCacheEntry > [super=GridCacheMapEntry [key=KeyCacheObjectImpl [part=1, val=1, > hasValBytes=true], val=CacheObjectImpl [val=null, hasValBytes=true], > ver=GridCacheVersion [topVer=144183944, order=1532703942007, nodeOrder=1], > hash=1, extras=GridCacheMvccEntryExtras [mvcc=GridCacheMvcc > [locs=[GridCacheMvccCandidate [nodeId=1068e98c-9c17-4fee-967b-8bbbb2700000, > ver=GridCacheVersion [topVer=144183944, order=1532703942006, nodeOrder=1], > threadId=14, id=2, topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], > reentry=null, otherNodeId=1068e98c-9c17-4fee-967b-8bbbb2700000, > otherVer=GridCacheVersion [topVer=144183944, order=1532703942006, > nodeOrder=1], mappedDhtNodes=null, mappedNearNodes=null, ownerVer=null, > serOrder=GridCacheVersion [topVer=144183944, order=1532703942006, > nodeOrder=1], key=KeyCacheObjectImpl [part=1, val=1, hasValBytes=true], > masks=local=1|owner=1|ready=1|reentry=0|used=0|tx=1|single_implicit=0|dht_local=1|near_local=0|removed=0|read=0, > prevVer=GridCacheVersion [topVer=144183944, order=1532703942006, > nodeOrder=1], nextVer=null]], rmts=null]], flags=2]]], prepared=1, > locked=false, nodeId=1068e98c-9c17-4fee-967b-8bbbb2700000, locMapped=false, > expiryPlc=null, transferExpiryPlc=false, flags=0, partUpdateCntr=1, > serReadVer=null, xidVer=GridCacheVersion [topVer=144183944, > order=1532703942006, nodeOrder=1]]]], super=IgniteTxAdapter > [xidVer=GridCacheVersion [topVer=144183944, order=1532703942006, > nodeOrder=1], writeVer=GridCacheVersion [topVer=144183944, > order=1532703942007, nodeOrder=1], implicit=false, loc=true, threadId=14, > startTime=1532703943980, nodeId=1068e98c-9c17-4fee-967b-8bbbb2700000, > startVer=GridCacheVersion [topVer=144183944, order=1532703942006, > nodeOrder=1], endVer=null, isolation=SERIALIZABLE, concurrency=OPTIMISTIC, > timeout=0, sysInvalidate=false, sys=false, plc=2, commitVer=GridCacheVersion > [topVer=144183944, order=1532703942006, nodeOrder=1], finalizing=USER_FINISH, > invalidParts=null, state=COMMITTING, timedOut=false, > topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], duration=50ms, > onePhaseCommit=true], size=2]]], commit=true, mappings=IgniteTxMappingsImpl > [], trackable=true, finishOnePhaseCalled=true, innerFuts=[[loc=true, > done=true]], super=GridCompoundIdentityFuture [super=GridCompoundFuture > [rdc=AlwaysTrueReducer [], initFlag=1, lsnrCalls=1, done=false, > cancelled=false, err=null, futs=[true]]]] > java.lang.ClassCastException: > org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry > cannot be cast to > org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry > at > org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry.checkThreadChain(GridLocalCacheEntry.java:247) > at > org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry.removeLock(GridLocalCacheEntry.java:360) > at > org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry.txUnlock(GridLocalCacheEntry.java:266) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.txUnlock(IgniteTxManager.java:1732) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.unlockMultiple(IgniteTxManager.java:1751) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.commitTx(IgniteTxManager.java:1272) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.tmFinish(IgniteTxLocalAdapter.java:963) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.onDone(GridNearTxFinishFuture.java:338) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.onDone(GridNearTxFinishFuture.java:71) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:451) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.checkComplete(GridCompoundFuture.java:285) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.apply(GridCompoundFuture.java:144) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.apply(GridCompoundFuture.java:45) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:383) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:353) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.add(GridCompoundFuture.java:244) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finishOnePhase(GridNearTxFinishFuture.java:709) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.onDone(GridNearTxFinishFuture.java:335) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.onDone(GridNearTxFinishFuture.java:71) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:451) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.checkComplete(GridCompoundFuture.java:285) > at > org.apache.ignite.internal.util.future.GridCompoundFuture.markInitialized(GridCompoundFuture.java:276) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.doFinish(GridNearTxFinishFuture.java:482) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:417) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$19.apply(GridNearTxLocal.java:3369) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$19.apply(GridNearTxLocal.java:3363) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:383) > at > org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:353) > at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.commitNearTxLocalAsync(GridNearTxLocal.java:3363) > at > org.apache.ignite.internal.processors.cache.GridCacheSharedContext.commitTxAsync(GridCacheSharedContext.java:987) > at > org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.commit(TransactionProxyImpl.java:297) > at > org.apache.ignite.internal.processors.cache.transactions.LocalCacheFails.testLocalCache(LocalCacheFails.java:57) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at junit.framework.TestCase.runTest(TestCase.java:176) > at > org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2087) > at > org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:140) > at > org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:2002) > at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)