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

Vyacheslav Koptilin commented on IGNITE-10514:
----------------------------------------------

It seems that {{TxStateChangeEventTest.testRemote}} is a known issue 
https://issues.apache.org/jira/browse/IGNITE-9838

> Cache validation on the primary node may result in AssertionError
> -----------------------------------------------------------------
>
>                 Key: IGNITE-10514
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10514
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.8
>            Reporter: Vyacheslav Koptilin
>            Assignee: Vyacheslav Koptilin
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain
>             Fix For: 2.8
>
>
> Cache validation on the primary node, that was introduced by IGNITE-10413, 
> may lead to the following AssertionError.
> {code:java}
> java.lang.AssertionError: GridDhtPartitionsExchangeFuture 
> [firstDiscoEvt=DiscoveryCustomEvent [customMsg=CacheAffinityChangeMessage 
> [...]]
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1788)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1671)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3184)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$400(GridDhtAtomicCache.java:138)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:273)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:268)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:1059)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:584)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:383)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:309)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:100)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:299)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1568)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1196)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:127)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1092)
>       at 
> org.apache.ignite.internal.util.StripedExecutor$Stripe.body(StripedExecutor.java:505)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> Let's consider the following scenario:
>  * Start one node and upload data.
>  * Start a new node (note that this step triggers rebalancing).
>  * Start explicit transaction and try to update atomic cache (it is assumed 
> that atomic operation are allowed for use inside transactions, see Ignite 
> system property DFLT_ALLOW_ATOMIC_OPS_IN_TX)
> {code:java}
> IgniteTransactions txs = ignite.transactions();
> try (Transaction tx = txs.txStart()) {
>     atomicCache.put();
>     tx.commit();
> }
> {code}
> Let's assume that the transaction mapped on the topology version that is 
> related to {{NODE_JOIN}} event,
>  on the other hand, the corresponding request 
> {{GridNearAtomicAbstractUpdateRequest}} can be validated on the primary node 
> using the next topology version, triggered by {{CacheAffinityMessage}}.
> {code:java|title=GridDhtAtomicCache.java}
> private void updateAllAsyncInternal0() {
>     ...
>     if (validateCache) {
>         GridDhtTopologyFuture topFut = top.topologyVersionFuture();
>         // There is a chance that the topFut is not done yet!
>         assert topFut.isDone() : topFut;
>         Throwable err = topFut.validateCache(ctx, req.recovery(), false, 
> null, null);
>         ...
>     }
> }{code}
> That is the root cause of the {{AssertionError}} mentioned above.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to