[ 
https://issues.apache.org/jira/browse/IGNITE-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637033#comment-14637033
 ] 

Andrey Gura edited comment on IGNITE-79 at 7/22/15 3:08 PM:
------------------------------------------------------------

Reproduced on 1.3.0 during working on IGNITE-1079. 
{{IgniteComplexHATest.testComplexFailover}} sometimes fails with this exception.

{noformat}
Failed processing message [senderId=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, 
msg=GridNearAtomicUpdateRequest [nodeId=5de15c49-4bb2-4b52-ae2c-b6317dac1e8c, 
futVer=GridCacheVersion [topVer=49056351, nodeOrderDrId=2, 
globalTime=1437576347424, order=1437576339274], fastMap=false, updateVer=null, 
topVer=AffinityTopologyVersion [topVer=8, minorTopVer=3], topLocked=false, 
syncMode=PRIMARY_SYNC, op=UPDATE, keys=[KeyCacheObjectImpl 
[val=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, hasValBytes=true]], 
conflictTtls=null, conflictExpireTimes=null, retval=true, expiryPlc=null, 
hasPrimary=true, subjId=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, taskNameHash=0, 
skipStore=false, clientReq=false, filter=null, parent=GridCacheMessage 
[msgId=13419, depInfo=null, err=null, skipPrepare=false]]] 
java.lang.IllegalStateException: Getting affinity for topology version earlier 
than affinity is calculated [locNodeId=5de15c49-4bb2-4b52-ae2c-b6317dac1e8c, 
cache=vertx.cache.__vertx.haInfo, topVer=AffinityTopologyVersion [topVer=8, 
minorTopVer=3], head=AffinityTopologyVersion [topVer=8, minorTopVer=4], 
history=[AffinityTopologyVersion [topVer=8, minorTopVer=4]]]
        at 
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:408)
        at 
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.nodes(GridAffinityAssignmentCache.java:363)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.nodes(GridCacheAffinityManager.java:201)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.localNode(GridCacheAffinityManager.java:303)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.localPartition(GridDhtPartitionTopologyImpl.java:508)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.localPartition(GridDhtPartitionTopologyImpl.java:496)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.onAdded(GridDhtPartitionTopologyImpl.java:580)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.<init>(GridDhtCacheEntry.java:79)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCacheEntry.<init>(GridDhtAtomicCacheEntry.java:46)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$1.create(GridDhtAtomicCache.java:130)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap$Segment.put0(GridCacheConcurrentMap.java:964)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap$Segment.putIfObsolete(GridCacheConcurrentMap.java:1028)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap.putEntryIfObsoleteOrAbsent(GridCacheConcurrentMap.java:496)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.entry0(GridCacheAdapter.java:857)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.entryEx(GridCacheAdapter.java:841)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.entryEx(GridDhtCacheAdapter.java:312)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.entryExx(GridDhtCacheAdapter.java:331)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2083)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1037)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:996)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:2358)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$500(GridDhtAtomicCache.java:64)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:186)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:184)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:534)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:240)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:158)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:48)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:127)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:761)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager.access$1500(GridIoManager.java:59)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:724)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
{noformat}


was (Author: agura):
Reproduced during working on IGNITE-1079. 
{{IgniteComplexHATest.testComplexFailover}} sometimes fails with this exception.

{noformat}
Failed processing message [senderId=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, 
msg=GridNearAtomicUpdateRequest [nodeId=5de15c49-4bb2-4b52-ae2c-b6317dac1e8c, 
futVer=GridCacheVersion [topVer=49056351, nodeOrderDrId=2, 
globalTime=1437576347424, order=1437576339274], fastMap=false, updateVer=null, 
topVer=AffinityTopologyVersion [topVer=8, minorTopVer=3], topLocked=false, 
syncMode=PRIMARY_SYNC, op=UPDATE, keys=[KeyCacheObjectImpl 
[val=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, hasValBytes=true]], 
conflictTtls=null, conflictExpireTimes=null, retval=true, expiryPlc=null, 
hasPrimary=true, subjId=1e9ae330-dc44-4c0f-b1cd-60f7f3b569df, taskNameHash=0, 
skipStore=false, clientReq=false, filter=null, parent=GridCacheMessage 
[msgId=13419, depInfo=null, err=null, skipPrepare=false]]] 
java.lang.IllegalStateException: Getting affinity for topology version earlier 
than affinity is calculated [locNodeId=5de15c49-4bb2-4b52-ae2c-b6317dac1e8c, 
cache=vertx.cache.__vertx.haInfo, topVer=AffinityTopologyVersion [topVer=8, 
minorTopVer=3], head=AffinityTopologyVersion [topVer=8, minorTopVer=4], 
history=[AffinityTopologyVersion [topVer=8, minorTopVer=4]]]
        at 
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:408)
        at 
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.nodes(GridAffinityAssignmentCache.java:363)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.nodes(GridCacheAffinityManager.java:201)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.localNode(GridCacheAffinityManager.java:303)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.localPartition(GridDhtPartitionTopologyImpl.java:508)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.localPartition(GridDhtPartitionTopologyImpl.java:496)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.onAdded(GridDhtPartitionTopologyImpl.java:580)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.<init>(GridDhtCacheEntry.java:79)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCacheEntry.<init>(GridDhtAtomicCacheEntry.java:46)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$1.create(GridDhtAtomicCache.java:130)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap$Segment.put0(GridCacheConcurrentMap.java:964)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap$Segment.putIfObsolete(GridCacheConcurrentMap.java:1028)
        at 
org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap.putEntryIfObsoleteOrAbsent(GridCacheConcurrentMap.java:496)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.entry0(GridCacheAdapter.java:857)
        at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.entryEx(GridCacheAdapter.java:841)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.entryEx(GridDhtCacheAdapter.java:312)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.entryExx(GridDhtCacheAdapter.java:331)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2083)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1037)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:996)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:2358)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$500(GridDhtAtomicCache.java:64)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:186)
        at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:184)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:534)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:240)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:158)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:48)
        at 
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:127)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:761)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager.access$1500(GridIoManager.java:59)
        at 
org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:724)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
{noformat}

> Illegal state exception in affinity assignment cache
> ----------------------------------------------------
>
>                 Key: IGNITE-79
>                 URL: https://issues.apache.org/jira/browse/IGNITE-79
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Yakov Zhdanov
>            Assignee: Alexey Goncharuk
>
> {noformat}
> java.lang.IllegalStateException: Getting affinity for topology version 
> earlier than affinity is calculated 
> [locNodeId=41caf5c2-3827-4566-9e52-22dabf51f864, topVer=179, head=180]
>       at 
> org.gridgain.grid.kernal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:328)
>  ~[gridgain-core-6.2.1-p1.jar:na]
>       at 
> org.gridgain.grid.kernal.processors.affinity.GridAffinityAssignmentCache.primaryPartitions(GridAffinityAssignmentCache.java:294)
>  ~[gridgain-core-6.2.1-p1.jar:na]
>       at 
> org.gridgain.grid.kernal.processors.cache.GridCacheAffinityManager.primaryPartitions(GridCacheAffinityManager.java:349)
>  ~[gridgain-core-6.2.1-p1.jar:na]
>       at 
> org.gridgain.grid.kernal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:478)
>  ~[gridgain-core-6.2.1-p1.jar:na]
>       at 
> org.gridgain.grid.kernal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandPool$ExchangeWorker.body(GridDhtPartitionDemandPool.java:1285)
>  ~[gridgain-core-6.2.1-p1.jar:na]
>       at org.gridgain.grid.util.worker.GridWorker.run(GridWorker.java:151) 
> ~[gridgain-core-6.2.1-p1.jar:na]
>       at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to