ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin" ...@linlyu.com>
Subject Re: CacheContinuousQuery did not work after the second server nodejoinned into the topology.
Date Fri, 30 Sep 2016 04:18:30 GMT
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.
Mime
View raw message