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

Semen Boikov commented on IGNITE-2189:
--------------------------------------

I did some fixes for client cache close as part of IGNITE-5272 fix 
(4026ddcc2161ca4bf5ad3dc04cabd284c608738a, block io before stopping cache). 
Looks like .CacheStopAndDestroySelfTest#testNearClose started to pass, also 
added IgniteNearClientCacheCloseTest, need investigate if additional fixes 
required.

> Race b/w cache message processing and cache close
> -------------------------------------------------
>
>                 Key: IGNITE-2189
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2189
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: cache
>    Affects Versions: 1.5.0.final
>            Reporter: Alexey Goncharuk
>             Fix For: 2.2
>
>
> org.apache.ignite.internal.processors.cache.CacheStopAndDestroySelfTest#testNearClose
>  sporadically hangs with the following assertion:
> {code}
> [09:20:19]W:           [org.apache.ignite:ignite-core] [09:20:19,064][WARN 
> ][main][root] Finished waiting for topology map update 
> [grid=cache.CacheStopAndDestroySelfTest0, p=1, duration=3014ms]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,084][INFO 
> ][exchange-worker-#94931%cache.CacheStopAndDestroySelfTest1%][GridCacheProcessor]
>  Started cache [name=cache_near, mode=PARTITIONED]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,097][INFO 
> ][exchange-worker-#94938%cache.CacheStopAndDestroySelfTest0%][GridCacheProcessor]
>  Started cache [name=cache_near, mode=PARTITIONED]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,137][INFO 
> ][exchange-worker-#94931%cache.CacheStopAndDestroySelfTest1%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT, 
> node=c34b495f-3427-4697-8b0a-9ecf01300000]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,139][INFO 
> ][exchange-worker-#94938%cache.CacheStopAndDestroySelfTest0%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT, 
> node=c34b495f-3427-4697-8b0a-9ecf01300000]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,141][INFO 
> ][exchange-worker-#94927%cache.CacheStopAndDestroySelfTest2%][GridCacheProcessor]
>  Started cache [name=cache_near, mode=PARTITIONED]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,145][INFO 
> ][exchange-worker-#94931%cache.CacheStopAndDestroySelfTest1%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=2], evt=DISCOVERY_CUSTOM_EVT, 
> node=b6613820-be62-4d0b-9438-0d4eb5200002]
> [09:20:19] :           [org.apache.ignite:ignite-core] [09:20:19,145][INFO 
> ][exchange-worker-#94938%cache.CacheStopAndDestroySelfTest0%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=2], evt=DISCOVERY_CUSTOM_EVT, 
> node=b6613820-be62-4d0b-9438-0d4eb5200002]
> [09:20:20] :           [org.apache.ignite:ignite-core] [09:20:20,184][INFO 
> ][exchange-worker-#94927%cache.CacheStopAndDestroySelfTest2%][GridCacheProcessor]
>  Stopped cache: cache_near
> [09:20:20]W:           [org.apache.ignite:ignite-core] 
> [09:20:20,186][ERROR][sys-#94769%cache.CacheStopAndDestroySelfTest2%][GridCacheIoManager]
>  Failed to process message [senderId=c34b495f-3427-4697-8b0a-9ecf01300000, 
> messageType=class 
> o.a.i.i.processors.cache.distributed.dht.GridDhtTxPrepareRequest]
> [09:20:20]W:           [org.apache.ignite:ignite-core] 
> java.lang.AssertionError: Failed to find cache context [cacheId=28897989, 
> readyTopVer=AffinityTopologyVersion [topVer=3, minorTopVer=3]]
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry.unmarshal(IgniteTxEntry.java:842)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheMessage.unmarshalTx(GridCacheMessage.java:407)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest.finishUnmarshal(GridDhtTxPrepareRequest.java:325)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.unmarshall(GridCacheIoManager.java:1038)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:275)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:204)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:80)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:163)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:819)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$1600(GridIoManager.java:103)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:782)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [09:20:20]W:           [org.apache.ignite:ignite-core]        at 
> java.lang.Thread.run(Thread.java:745)
> [09:20:20]W:           [org.apache.ignite:ignite-core] Exception in thread 
> "sys-#94769%cache.CacheStopAndDestroySelfTest2%" java.lang.AssertionError: 
> Failed to find cache context [cacheId=28897989, 
> readyTopVer=AffinityTopologyVersion [topVer=3, minorTopVer=3]]
> [09:20:20] :           [org.apache.ignite:ignite-core] [09:20:20,189][INFO 
> ][exchange-worker-#94931%cache.CacheStopAndDestroySelfTest1%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=3], evt=DISCOVERY_CUSTOM_EVT, 
> node=b6613820-be62-4d0b-9438-0d4eb5200002]
> [09:20:20] :           [org.apache.ignite:ignite-core] [09:20:20,189][INFO 
> ][exchange-worker-#94938%cache.CacheStopAndDestroySelfTest0%][GridCachePartitionExchangeManager]
>  Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion 
> [topVer=3, minorTopVer=3], evt=DISCOVERY_CUSTOM_EVT, 
> node=b6613820-be62-4d0b-9438-0d4eb5200002]
> {code}
> Message gets sent when near cache still exists, but gets processed when near 
> cache has been already destroyed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to