ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-3984) NullPointerException in IgniteCacheProxy when creating continuous query
Date Tue, 04 Oct 2016 03:17:20 GMT

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

Jason Man commented on IGNITE-3984:
-----------------------------------

Although I'm not sure which PR fixes this, but the latest 1.8.0-SNAPSHOT seem to have fixed
this problem. I've downloaded it from here: https://builds.apache.org/view/H-L/view/Ignite/job/Ignite-nightly/lastSuccessfulBuild/
and tried it successfully.


> 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)

Mime
View raw message