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] [Updated] (IGNITE-3984) NullPointerException in IgniteCacheProxy when creating continuous query
Date Wed, 28 Sep 2016 01:52:20 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-3984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jason Man updated IGNITE-3984:
------------------------------
    Description: 
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}


  was:
Test attached.  This used to work fine in 1.6.  This seem to be related to this jira and PR:

{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}

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}



> 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