You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Lin <me...@linlyu.com> on 2016/09/29 12:42:47 UTC

CacheContinuousQuery did not work after the second server node joinned into the topology.

Hi all, I have a question on CacheContinuousQuery, after the second server node joined into the topology, the continuous query in the client is not worked.


My ignite version is 1.6.0, here is my tests:
1. start the first server node by running ServerNode.java
2. start the CQClient.java to create a continuous query client, and waiting for the CacheContinuousQueryEvent(s) with a remote filter.
3. start a data client by running DataPuttingClient.java, it will putting some data into the cache. And, at the same time, the CQClient can receive the filtered events.
see the outputs in [1].
4. you can run the step 3 any times, and you can get the similar results like [1].
5. but if you start a second server node by running ServerNode.java, and put data by running DataPuttingClient.java, it is weired that the server(s) processed the filters, but the client didn't receive any CacheContinuousQueryEvent even if the filter result is true, so the CQClient did not output anything like [1]. 


You can reproduce it with the codes and settings in src-config.zip (see the attachement).


[1] example outputs


server1 outputs result after first time running of DataPuttingClient.
[20:21:01] Topology snapshot [ver=3, servers=1, clients=2, CPUs=8, heap=11.0GB]
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=2, oldVal=1], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=3, oldVal=2], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=4, oldVal=3], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=5, oldVal=4], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=6, oldVal=5], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=7, oldVal=6], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=8, oldVal=7], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=9, oldVal=8], with ret true
[20:21:01] Topology snapshot [ver=4, servers=1, clients=1, CPUs=8, heap=7.1GB]


server1 outputs result after the second time running of DataPuttingClient.
[20:21:24] Topology snapshot [ver=5, servers=1, clients=2, CPUs=8, heap=11.0GB]
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=9], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=2, oldVal=1], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=3, oldVal=2], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=4, oldVal=3], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=5, oldVal=4], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=6, oldVal=5], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=7, oldVal=6], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=8, oldVal=7], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=9, oldVal=8], with ret true


CQClient's outputs after first time run of DataPuttingClient
sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null]
sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]
sys-#13%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=2, oldVal=1]
sys-#10%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=3, oldVal=2]
sys-#11%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=4, oldVal=3]
sys-#14%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=5, oldVal=4]
sys-#3%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=6, oldVal=5]
sys-#7%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=7, oldVal=6]
sys-#16%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=8, oldVal=7]
sys-#4%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=9, oldVal=8]


CQClient's outputs after the second time running of DataPuttingClient
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=9]
sys-#6%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]
sys-#9%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=2, oldVal=1]
sys-#8%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=3, oldVal=2]
sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=4, oldVal=3]
sys-#13%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=5, oldVal=4]
sys-#10%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=6, oldVal=5]
sys-#11%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=7, oldVal=6]
sys-#14%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=8, oldVal=7]
sys-#3%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=9, oldVal=8]

Re: CacheContinuousQuery did not work after the second servernodejoinned into the topology.

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi Lin,

In your case autoUnsubsribe flag should be set to false.

Could you describe how change performance after you enable cache events?

Thanks,
Nikolay

On Mon, Oct 10, 2016 at 6:59 AM, Lin <me...@linlyu.com> wrote:

> Hi Nikolay,
>
> I have a requirement on CQ to implement some functions like event
> listener. The client initializes and adds one listener to ther cluster, and
> hope to can recevie the expected CacheEntryEvent persistently without
> considering the leaving or adding nodes.
>
> firstly, i implement this feacture with the Ignite.events, but the
> performance is unacceptable.
>
> Any advices are welcome.
>
> Lin.
>
>
> ------------------ Original ------------------
> *From: * "Nikolai Tikhonov";<nt...@apache.org>;
> *Date: * Fri, Oct 7, 2016 09:34 PM
> *To: * "user"<us...@ignite.apache.org>;
> *Subject: * Re: CacheContinuousQuery did not work after the second
> servernodejoinned into the topology.
>
> Hi Lin!
>
> It's bug. I've create ticket and you can track progress there
> https://issues.apache.org/jira/browse/IGNITE-4047. How workaround you can
> start CQ with setAutoUnsubscribe(true).
>
> BTW: Why you use CQ with auto unsubscribe false?
>
> Thanks,
> Nikolay
>
> On Fri, Sep 30, 2016 at 7:18 AM, Lin <me...@linlyu.com> wrote:
>
>> Hi Vladislav,
>>
>> Thank you for your response. I can reproduce this issue with the maven
>> project you gave.
>>
>> My problems is that: after the second server node joinned into the
>> topology, I put some data into the cache, the result is that the CQ query
>> works in the first and second server nodes (the remote filter procuduced
>> the system output as expceted), but the CQ query client node was not
>> working as expected ( the CacheEntryUpdatedListener was not trigged any
>> more).
>>
>> I have modified the pom with my enviroment (only some modification about
>> package versions), and add some shell script in windows to reproduce the
>> issue easily.
>> My enviroment is ignite ver. 1.6.0#20160518-sha1:0b22c45b, the details
>> can be found in the log file in "log/s1.debug.log" which was produced with
>> the "-X" parameter in maven (see script server.bat).
>>
>> Here is the steps about how to reproduce the issue in my envrioment.
>> 1. mvn compile, the produce the target classes and ignite-*.xml.
>> 2. the first test
>> 2.1 run the server.bat to start the first server node, the console
>> outputs were piped into s1.log.
>> 2.2 run the CQClient.bat to create a client with cq query, when the
>> CacheContinuousQueryEvent is received, it will produce outputs like
>> `
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=CREATED, key=5, newVal=0, oldVal=null]
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
>> `
>> in the client node, and the server node will produce outputs like
>> `
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
>> `
>> 2.3 run the DataClient.bat to put 2 kv pairs( (5, 0), (5,1)) into given
>> cache and exit. This will cause the server1 producing outputs from remote
>> filter
>> `
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
>> `
>> and cause the CQ client producing outputs from CacheEntryUpdatedListener
>> in the client,
>> `
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=CREATED, key=5, newVal=0, oldVal=null]
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
>> `
>>
>>
>> 3. continue to start the second test, and the issue is occurred,
>> 3.1 run the server.bat to start the second server node, and piped its
>> output into s2.log.
>> 3.2 run the DataClient.bat to put the same 2 kv pairs into cache, and in
>> server1 and server2's outputs, the remote filters output are the same,
>> `
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=0, oldVal=1], with ret true
>> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
>> `
>> but in the CQClient's output, there is nothing, the expected output
>> should be something like
>> `
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=0, oldVal=1]
>> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
>> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
>> `
>> but not.
>>
>> It looks like that the remote filter is initialized in the server2 node
>> with method org.apache.ignite.internal.processors.cache.query.continuous
>> .CacheContinuousQueryHandlerV2#readExternal,
>> but the links between remote filter and local listener is broken? The
>> CacheContinuousQueryEvent didn't pass to the client.
>>
>> And in the meanwhile, why the two server node process the same data?
>>
>> Hope for your help.
>>
>>
>> Lin.
>>
>
>

Re: CacheContinuousQuery did not work after the second servernodejoinned into the topology.

Posted by Lin <me...@linlyu.com>.
Hi Nikolay,


I have a requirement on CQ to implement some functions like event listener. The client initializes and adds one listener to ther cluster, and hope to can recevie the expected CacheEntryEvent persistently without considering the leaving or adding nodes.


firstly, i implement this feacture with the Ignite.events, but the performance is unacceptable.


Any advices are welcome.


Lin.




------------------ Original ------------------
From:  "Nikolai Tikhonov";<nt...@apache.org>;
Date:  Fri, Oct 7, 2016 09:34 PM
To:  "user"<us...@ignite.apache.org>; 

Subject:  Re: CacheContinuousQuery did not work after the second servernodejoinned into the topology.



Hi Lin!

It's bug. I've create ticket and you can track progress there https://issues.apache.org/jira/browse/IGNITE-4047. How workaround you can start CQ with setAutoUnsubscribe(true).


BTW: Why you use CQ with auto unsubscribe false?


Thanks, 
Nikolay


On Fri, Sep 30, 2016 at 7:18 AM, Lin <me...@linlyu.com> wrote:
Hi Vladislav,


Thank you for your response. I can reproduce this issue with the maven project you gave.


My problems is that: after the second server node joinned into the topology, I put some data into the cache, the result is that the CQ query works in the first and second server nodes (the remote filter procuduced the system output as expceted), but the CQ query client node was not working as expected ( the CacheEntryUpdatedListener was not trigged any more).


I have modified the pom with my enviroment (only some modification about package versions), and add some shell script in windows to reproduce the issue easily.
My enviroment is ignite ver. 1.6.0#20160518-sha1:0b22c45b, the details can be found in the log file in "log/s1.debug.log" which was produced with the "-X" parameter in maven (see script server.bat).


Here is the steps about how to reproduce the issue in my envrioment.
1. mvn compile, the produce the target classes and ignite-*.xml.
2. the first test
2.1 run the server.bat to start the first server node, the console outputs were piped into s1.log.
2.2 run the CQClient.bat to create a client with cq query, when the CacheContinuousQueryEvent is received, it will produce outputs like
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]
`
in the client node, and the server node will produce outputs like
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
2.3 run the DataClient.bat to put 2 kv pairs( (5, 0), (5,1)) into given cache and exit. This will cause the server1 producing outputs from remote filter
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
and cause the CQ client producing outputs from CacheEntryUpdatedListener in the client,
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]

`




3. continue to start the second test, and the issue is occurred,
3.1 run the server.bat to start the second server node, and piped its output into s2.log.
3.2 run the DataClient.bat to put the same 2 kv pairs into cache, and in server1 and server2's outputs, the remote filters output are the same,
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=1], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
but in the CQClient's output, there is nothing, the expected output should be something like
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=1]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]

`

but not.


It looks like that the remote filter is initialized in the server2 node with method org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandlerV2#readExternal,
but the links between remote filter and local listener is broken? The CacheContinuousQueryEvent didn't pass to the client.


And in the meanwhile, why the two server node process the same data?


Hope for your help.




Lin.

Re: CacheContinuousQuery did not work after the second server nodejoinned into the topology.

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi Lin!

It's bug. I've create ticket and you can track progress there
https://issues.apache.org/jira/browse/IGNITE-4047. How workaround you can
start CQ with setAutoUnsubscribe(true).

BTW: Why you use CQ with auto unsubscribe false?

Thanks,
Nikolay

On Fri, Sep 30, 2016 at 7:18 AM, Lin <me...@linlyu.com> wrote:

> Hi Vladislav,
>
> Thank you for your response. I can reproduce this issue with the maven
> project you gave.
>
> My problems is that: after the second server node joinned into the
> topology, I put some data into the cache, the result is that the CQ query
> works in the first and second server nodes (the remote filter procuduced
> the system output as expceted), but the CQ query client node was not
> working as expected ( the CacheEntryUpdatedListener was not trigged any
> more).
>
> I have modified the pom with my enviroment (only some modification about
> package versions), and add some shell script in windows to reproduce the
> issue easily.
> My enviroment is ignite ver. 1.6.0#20160518-sha1:0b22c45b, the details
> can be found in the log file in "log/s1.debug.log" which was produced with
> the "-X" parameter in maven (see script server.bat).
>
> Here is the steps about how to reproduce the issue in my envrioment.
> 1. mvn compile, the produce the target classes and ignite-*.xml.
> 2. the first test
> 2.1 run the server.bat to start the first server node, the console outputs
> were piped into s1.log.
> 2.2 run the CQClient.bat to create a client with cq query, when the
> CacheContinuousQueryEvent is received, it will produce outputs like
> `
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null]
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
> `
> in the client node, and the server node will produce outputs like
> `
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
> `
> 2.3 run the DataClient.bat to put 2 kv pairs( (5, 0), (5,1)) into given
> cache and exit. This will cause the server1 producing outputs from remote
> filter
> `
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
> `
> and cause the CQ client producing outputs from CacheEntryUpdatedListener
> in the client,
> `
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null]
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
> `
>
>
> 3. continue to start the second test, and the issue is occurred,
> 3.1 run the server.bat to start the second server node, and piped its
> output into s2.log.
> 3.2 run the DataClient.bat to put the same 2 kv pairs into cache, and in
> server1 and server2's outputs, the remote filters output are the same,
> `
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=0, oldVal=1], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
> `
> but in the CQClient's output, there is nothing, the expected output should
> be something like
> `
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=0, oldVal=1]
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
> `
> but not.
>
> It looks like that the remote filter is initialized in the server2 node
> with method org.apache.ignite.internal.processors.cache.query.continuous.
> CacheContinuousQueryHandlerV2#readExternal,
> but the links between remote filter and local listener is broken? The
> CacheContinuousQueryEvent didn't pass to the client.
>
> And in the meanwhile, why the two server node process the same data?
>
> Hope for your help.
>
>
> Lin.
>

Re: CacheContinuousQuery did not work after the second server nodejoinned into the topology.

Posted by Lin <me...@linlyu.com>.
Hi Vladislav,


Thank you for your response. I can reproduce this issue with the maven project you gave.


My problems is that: after the second server node joinned into the topology, I put some data into the cache, the result is that the CQ query works in the first and second server nodes (the remote filter procuduced the system output as expceted), but the CQ query client node was not working as expected ( the CacheEntryUpdatedListener was not trigged any more).


I have modified the pom with my enviroment (only some modification about package versions), and add some shell script in windows to reproduce the issue easily.
My enviroment is ignite ver. 1.6.0#20160518-sha1:0b22c45b, the details can be found in the log file in "log/s1.debug.log" which was produced with the "-X" parameter in maven (see script server.bat).


Here is the steps about how to reproduce the issue in my envrioment.
1. mvn compile, the produce the target classes and ignite-*.xml.
2. the first test
2.1 run the server.bat to start the first server node, the console outputs were piped into s1.log.
2.2 run the CQClient.bat to create a client with cq query, when the CacheContinuousQueryEvent is received, it will produce outputs like
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]
`
in the client node, and the server node will produce outputs like
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
2.3 run the DataClient.bat to put 2 kv pairs( (5, 0), (5,1)) into given cache and exit. This will cause the server1 producing outputs from remote filter
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
and cause the CQ client producing outputs from CacheEntryUpdatedListener in the client,
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=CREATED, key=5, newVal=0, oldVal=null]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]

`




3. continue to start the second test, and the issue is occurred,
3.1 run the server.bat to start the second server node, and piped its output into s2.log.
3.2 run the DataClient.bat to put the same 2 kv pairs into cache, and in server1 and server2's outputs, the remote filters output are the same,
`
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=1], with ret true
CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true

`
but in the CQClient's output, there is nothing, the expected output should be something like
`
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=0, oldVal=1]
sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent [evtType=UPDATED, key=5, newVal=1, oldVal=0]

`

but not.


It looks like that the remote filter is initialized in the server2 node with method org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandlerV2#readExternal,
but the links between remote filter and local listener is broken? The CacheContinuousQueryEvent didn't pass to the client.


And in the meanwhile, why the two server node process the same data?


Hope for your help.




Lin.

Re: CacheContinuousQuery did not work after the second server node joinned into the topology.

Posted by Vladislav Pyatkov <vl...@gmail.com>.
Hi Lin,

I tried, to reproduce the issue, but could not to do it.
I checked your example on 6.0.0 and 7.0.0 version of Ignite and it works
correct.

Please, clarify is attached example working as you say?



On Thu, Sep 29, 2016 at 3:42 PM, Lin <me...@linlyu.com> wrote:

> Hi all, I have a question on CacheContinuousQuery, after the second server
> node joined into the topology, the continuous query in the client is not
> worked.
>
> My ignite version is 1.6.0, here is my tests:
> 1. start the first server node by running ServerNode.java
> 2. start the CQClient.java to create a continuous query client, and
> waiting for the CacheContinuousQueryEvent(s) with a remote filter.
> 3. start a data client by running DataPuttingClient.java, it will putting
> some data into the cache. And, at the same time, the CQClient can receive
> the filtered events.
> see the outputs in [1].
> 4. you can run the step 3 any times, and you can get the similar results
> like [1].
> 5. but if you start a second server node by running ServerNode.java, and
> put data by running DataPuttingClient.java, it is weired that the server(s)
> processed the filters, but the client didn't receive any
> CacheContinuousQueryEvent even if the filter result is true, so the
> CQClient did not output anything like [1].
>
> You can reproduce it with the codes and settings in src-config.zip (see
> the attachement).
>
> [1] example outputs
>
> server1 outputs result after first time running of DataPuttingClient.
> [20:21:01] Topology snapshot [ver=3, servers=1, clients=2, CPUs=8,
> heap=11.0GB]
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=2, oldVal=1], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=3, oldVal=2], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=4, oldVal=3], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=5, oldVal=4], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=6, oldVal=5], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=7, oldVal=6], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=8, oldVal=7], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=9, oldVal=8], with ret true
> [20:21:01] Topology snapshot [ver=4, servers=1, clients=1, CPUs=8,
> heap=7.1GB]
>
> server1 outputs result after the second time running of DataPuttingClient.
> [20:21:24] Topology snapshot [ver=5, servers=1, clients=2, CPUs=8,
> heap=11.0GB]
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=0, oldVal=9], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=2, oldVal=1], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=3, oldVal=2], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=4, oldVal=3], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=5, oldVal=4], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=6, oldVal=5], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=7, oldVal=6], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=8, oldVal=7], with ret true
> CacheEntryEventRemoteFilter.evaluate CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=9, oldVal=8], with ret true
>
> CQClient's outputs after first time run of DataPuttingClient
> sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=CREATED, key=5, newVal=0, oldVal=null]
> sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
> sys-#13%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=2, oldVal=1]
> sys-#10%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=3, oldVal=2]
> sys-#11%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=4, oldVal=3]
> sys-#14%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=5, oldVal=4]
> sys-#3%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=6, oldVal=5]
> sys-#7%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=7, oldVal=6]
> sys-#16%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=8, oldVal=7]
> sys-#4%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=9, oldVal=8]
>
> CQClient's outputs after the second time running of DataPuttingClient
> sys-#5%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=0, oldVal=9]
> sys-#6%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=1, oldVal=0]
> sys-#9%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=2, oldVal=1]
> sys-#8%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=3, oldVal=2]
> sys-#2%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=4, oldVal=3]
> sys-#13%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=5, oldVal=4]
> sys-#10%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=6, oldVal=5]
> sys-#11%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=7, oldVal=6]
> sys-#14%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=8, oldVal=7]
> sys-#3%null% receive CacheEntryEvent CacheContinuousQueryEvent
> [evtType=UPDATED, key=5, newVal=9, oldVal=8]
>
>


-- 
Vladislav Pyatkov