You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "dopsun (JIRA)" <ji...@apache.org> on 2016/12/12 09:22:58 UTC
[jira] [Commented] (IGNITE-3984) NullPointerException in
IgniteCacheProxy when creating continuous query
[ https://issues.apache.org/jira/browse/IGNITE-3984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15741418#comment-15741418 ]
dopsun commented on IGNITE-3984:
--------------------------------
IGNITE-3907 should be fixing this issue:
{code}
if (locIncluded || hnd.isQuery())
registerHandler(ctx.localNodeId(), routineId, hnd, bufSize, interval, autoUnsubscribe, true);
{code}
{{hnd.isQuery}} is added to ensure the {{registerHandler}} is called, even {{locIncluded}} is false.
> NullPointerException in IgniteCacheProxy when creating continuous query
> -----------------------------------------------------------------------
>
> Key: IGNITE-3984
> URL: https://issues.apache.org/jira/browse/IGNITE-3984
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 1.7
> Reporter: Jason Man
> Attachments: ContQueryTest.java
>
>
> Test attached. This used to work fine in 1.6.
> {code}
> Exception in thread "main" javax.cache.CacheException: java.lang.NullPointerException
> at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:709)
> at ContQueryTest.main(ContQueryTest.java:33)
> 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> Caused by: java.lang.NullPointerException
> at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler.getOrCreatePartitionRecovery(CacheContinuousQueryHandler.java:835)
> at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler.waitTopologyFuture(CacheContinuousQueryHandler.java:543)
> at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:660)
> at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery(CacheContinuousQueryManager.java:482)
> at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.queryContinuous(IgniteCacheProxy.java:611)
> at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:669)
> ... 6 more
> {code}
> This seem to be related to this jira and PR:
> https://issues.apache.org/jira/browse/IGNITE-3413
> https://github.com/apache/ignite/commit/89d64e74b697054a88c3a91433aaaf4f7fdd0284
> Here's the scenario:
> * First node starts with special attribute and creates a cache with the node filter that allows to deploy it only on nodes with this attribute
> * Second node starts without the attribute is started. When creating a continuous query to query the cache created by the first node, a NullPointerException is thrown.
> At first glance, it seems that because the NodeFilter prevented the GridContinuousProcessor.registerHandler() to be called , the ConcurrentMap<Integer, PartitionRecovery> rcvs is not initialized properly and NullPointerException is thrown on this line:
> {code}
> @NotNull private PartitionRecovery getOrCreatePartitionRecovery(GridKernalContext ctx, int partId) {
> PartitionRecovery rec = rcvs.get(partId);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)