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

Ivan Pavlukhin commented on IGNITE-12865:
-----------------------------------------

[~PetrovMikhail], could you please provide a stack trace? From the first glance 
it seems that there is a problem with {{filteredNode}} variable node usage in a 
node filter in the test. By some reason it can be serialized and I suppose 
deserialized not ready to use.

Will changing code in a following way fix the test?
{code}
Object filteredId = filteredNode.localNode().id();
filteredNode.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
    .setNodeFilter(node -> !node.id().equals(filteredId)));
{code}

> NPE occurs during CQ registration with cache node filter specified.
> -------------------------------------------------------------------
>
>                 Key: IGNITE-12865
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12865
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: PetrovMikhail
>            Priority: Minor
>
> NPE occurs during CQ registration if 
> 1. Node that starts cache does not match cache node filter.
> 2. CQ is started on node that matches cache node filter.
> Reproducer:
> {code:java}
> /** */
> @Test
> public void test() throws Exception {
>     IgniteEx filteredNode = startGrid(0);
>     IgniteEx cacheStoreNode = startGrid(1);
>     filteredNode.cluster().state(ClusterState.ACTIVE);
>     filteredNode.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
>         .setNodeFilter(node -> 
> !node.id().equals(filteredNode.localNode().id())));
>     ContinuousQuery<Object, Object> qry = new ContinuousQuery<>();
>     qry.setLocalListener(evts -> {
>         //No-op.
>     });
>     cacheStoreNode.cache(DEFAULT_CACHE_NAME).query(qry);
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to