ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-732) IgniteCache.size() should not fail in case of topology changes.
Date Wed, 29 Apr 2015 19:46:06 GMT

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

Andrey Gura commented on IGNITE-732:
------------------------------------

1. Done. But {{ComputeTask}} isn't best way to do it, because we need run it only on cache
data nodes.
2. Done. But at unlucky time closure start on node where cache stopped already but node is
still alive. As result we have NPE. Is it ok to catch them?
3. Now {{ClusterTopologyException}} logs only on debug level in {{GridTaskWorker}}.

> IgniteCache.size() should not fail in case of topology changes.
> ---------------------------------------------------------------
>
>                 Key: IGNITE-732
>                 URL: https://issues.apache.org/jira/browse/IGNITE-732
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Dmitriy Setrakyan
>            Assignee: Andrey Gura
>            Priority: Blocker
>             Fix For: sprint-4
>
>
> I believe that cache.size() method fails if topology changes during the execution. I
got the following error when executing word-count {{QueryWords}} class and removing one of
the server nodes.
> {code}
> Query results [total=1003726, avg=4.34, min=1, max=1314]
> (the,20)
> (and,9)
> (a,8)
> (in,8)
> (of,8)
> (that,5)
> (said,4)
> (on,4)
> (for,4)
> (to,4)
> [17:35:54] Topology snapshot [ver=5, nodes=3, CPUs=4, heap=4.0GB]
> [17:35:54,772][ERROR][disco-event-worker-#46%null%][GridTaskWorker] Failed to obtain
remote job result policy for result from ComputeTask.result(..) method (will fail the whole
task): GridJobResultImpl [job=C1 [arg=null], sib=GridJobSiblingImpl [sesId=9a42d9fac41-8437ac61-27ef-4e4b-951d-a29b18346bfe,
jobId=ba42d9fac41-833cae7a-295f-4578-a6b0-f4b6d3a1bf50, nodeId=833cae7a-295f-4578-a6b0-f4b6d3a1bf50,
isJobDone=false], jobCtx=GridJobContextImpl [jobId=ba42d9fac41-833cae7a-295f-4578-a6b0-f4b6d3a1bf50,
attrs={}], node=TcpDiscoveryNode [id=833cae7a-295f-4578-a6b0-f4b6d3a1bf50, addrs=[192.168.2.10,
0:0:0:0:0:0:0:1, 127.0.0.1], sockAddrs=[/192.168.2.10:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500],
discPort=47500, order=1, intOrder=1, loc=false, ver=1.0.0#19691231-sha1:00000000, isClient=false],
ex=class o.a.i.cluster.ClusterTopologyException: Node has left grid: 833cae7a-295f-4578-a6b0-f4b6d3a1bf50,
hasRes=true, isCancelled=false, isOccupied=true]
> class org.apache.ignite.cluster.ClusterTopologyException: Node has left grid: 833cae7a-295f-4578-a6b0-f4b6d3a1bf50
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.onNodeLeft(GridTaskWorker.java:1204)
> 	at org.apache.ignite.internal.processors.task.GridTaskProcessor$TaskDiscoveryListener.onEvent(GridTaskProcessor.java:1180)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.notifyListeners(GridEventStorageManager.java:739)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.notifyListeners(GridEventStorageManager.java:724)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.record(GridEventStorageManager.java:272)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.recordEvent(GridDiscoveryManager.java:1533)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body0(GridDiscoveryManager.java:1720)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body(GridDiscoveryManager.java:1572)
> 	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
> 	at java.lang.Thread.run(Thread.java:745)
> [17:35:55] Ignite node stopped OK [uptime=02:45:01:791]
> Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException:
Node has left grid: 833cae7a-295f-4578-a6b0-f4b6d3a1bf50
> 	at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1808)
> 	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:1463)
> 	at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.size(IgniteCacheProxy.java:594)
> 	at org.apache.ignite.examples.streaming.wordcount.QueryWords.main(QueryWords.java:69)
> 	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:483)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> Caused by: class org.apache.ignite.IgniteCheckedException: Node has left grid: 833cae7a-295f-4578-a6b0-f4b6d3a1bf50
> 	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6715)
> 	at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:124)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$68.applyx(GridCacheAdapter.java:3757)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$68.applyx(GridCacheAdapter.java:3754)
> 	at org.apache.ignite.internal.util.lang.IgniteClosureX.apply(IgniteClosureX.java:37)
> 	at org.apache.ignite.internal.util.future.GridFutureChainListener.apply(GridFutureChainListener.java:54)
> 	at org.apache.ignite.internal.util.future.GridFutureChainListener.apply(GridFutureChainListener.java:28)
> 	at org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:241)
> 	at org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListeners(GridFutureAdapter.java:229)
> 	at org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:359)
> 	at org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:325)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.finishTask(GridTaskWorker.java:1323)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.finishTask(GridTaskWorker.java:1291)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:871)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:822)
> 	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6139)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:822)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:718)
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.onNodeLeft(GridTaskWorker.java:1223)
> 	at org.apache.ignite.internal.processors.task.GridTaskProcessor$TaskDiscoveryListener.onEvent(GridTaskProcessor.java:1180)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.notifyListeners(GridEventStorageManager.java:739)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.notifyListeners(GridEventStorageManager.java:724)
> 	at org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager.record(GridEventStorageManager.java:272)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.recordEvent(GridDiscoveryManager.java:1533)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body0(GridDiscoveryManager.java:1720)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body(GridDiscoveryManager.java:1572)
> 	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.cluster.ClusterTopologyException: Node has left grid:
833cae7a-295f-4578-a6b0-f4b6d3a1bf50
> 	at org.apache.ignite.internal.processors.task.GridTaskWorker.onNodeLeft(GridTaskWorker.java:1204)
> 	... 9 more
> {code}



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

Mime
View raw message