Thanks for that idea – we can see that the listener works as expected, but our 
issue is at the beginning, when we run the initial query. At that time, it does 
not retrieve the data that is in the cache and we can see that because when we 
retry, then we get the results.  This also does not happen every time, but 
seems to be a sporadic issue and we don’t understand why this happens.


Latha Masters
Lead Software Engineer
Office:         +1 (434) 270-7713<tel:+1%20(434)%20270-7713>
Pronouns:       She, Her, Hers
[Merkle Inc]<https://www.merkleinc.com/>
[LinkedIn]<https://www.linkedin.com/company/merkle/>    [Twitter] 
<https://twitter.com/merkle>  [Facebook] <https://www.facebook.com/merkleinc/>  
      [Youtube] <https://www.youtube.com/user/MerkleCRM>      [Instagram] 
<https://www.instagram.com/merkle/>



[cid:image761666.jpg@1343CD97.76E3E4E9]



From: Surinder Mehra <redni...@gmail.com>
Date: Monday, September 27, 2021 at 2:44 PM
To: user@ignite.apache.org <user@ignite.apache.org>
Subject: Re: Help with ContinuousQuery issue
Hi,
Did you try to print data inside local listener. As I understand it, initial 
query is only when cintinuous query starts, after that, local listener and 
remote filter (if provided) play role.
On Tue, Sep 28, 2021, 00:02 Latha Masters 
<smast...@merkleinc.com<mailto:smast...@merkleinc.com>> wrote:
Hi all,

We’ve run into an issue when using ContinuousQuery and hoping someone can help 
provide some insight.

1           ContinuousQuery<K, V> query = new ContinuousQuery<>();
2            query.setLocalListener(listener);
3            query.setInitialQuery(new ScanQuery<>());
4            query.setPageSize(updatePageSize);
5            query.setTimeInterval(updateTimeInterval);
6            cursor = igniteCache.query(query);
7
8            for (Entry<K, V> entry : cursor) {
9                cache.put(entry.getKey(), entry.getValue());
10            }


With the code snippet above, we have verified that the igniteCache has data but 
occasionally the query on line 6 results in an empty cursor.

Our questions:

Is this expected behavior?

Is there some additional configuration step we are missing which could lead to 
inconsistent results from the initialQuery?

Is there a best practice for retrieving results from the initialQuery such as 
retry? We have noticed that if we retry after it fails to get results the first 
time, it will then succeed on a subsequent try with a one-second wait time 
between retries. We didn’t think this should be necessary so wondered if there 
was something we were doing incorrectly.

Please let me know if any additional information/logs are needed and thank you 
for your help!

Latha
Latha Masters
Lead Software Engineer
Office:
+1 (434) 270-7713<tel:+1%20(434)%20270-7713>
Pronouns:
She, Her, Hers
[Merkle Inc]<https://www.merkleinc.com>
[LinkedIn]<https://www.linkedin.com/company/merkle>
[Twitter]<https://twitter.com/merkle>
[Facebook]<https://www.facebook.com/merkleinc>
[Youtube]<https://www.youtube.com/user/MerkleCRM>
[Instagram]<https://www.instagram.com/merkle>



[cid:image507282.jpg@21231AA9.74FA36DC]




Merkle is named a Leader among Customer Database and Engagement Agencies. Get 
the report.<https://www2.merkleinc.com/l/47252/2021-02-09/8nlyvq>

Access Merkle’s award-winning Digital Marketing Report for the latest trends 
and benchmarks in digital 
marketing<https://www2.merkleinc.com/l/47252/2020-05-12/8g525n>

This email and any attachments transmitted with it are intended for use by the 
intended recipient(s) only. If you have received this email in error, please 
notify the sender immediately and then delete it. If you are not the intended 
recipient, you must not keep, use, disclose, copy or distribute this email 
without the author’s prior permission. We take precautions to minimize the risk 
of transmitting software viruses, but we advise you to perform your own virus 
checks on any attachment to this message. We cannot accept liability for any 
loss or damage caused by software viruses. The information contained in this 
communication may be confidential and may be subject to the attorney-client 
privilege.

Merkle is named a Leader among Customer Database and Engagement Agencies. Get 
the report.<https://www2.merkleinc.com/l/47252/2021-02-09/8nlyvq>

Access Merkle’s award-winning Digital Marketing Report for the latest trends 
and benchmarks in digital 
marketing<https://www2.merkleinc.com/l/47252/2020-05-12/8g525n>

This email and any attachments transmitted with it are intended for use by the 
intended recipient(s) only. If you have received this email in error, please 
notify the sender immediately and then delete it. If you are not the intended 
recipient, you must not keep, use, disclose, copy or distribute this email 
without the author’s prior permission. We take precautions to minimize the risk 
of transmitting software viruses, but we advise you to perform your own virus 
checks on any attachment to this message. We cannot accept liability for any 
loss or damage caused by software viruses. The information contained in this 
communication may be confidential and may be subject to the attorney-client 
privilege.

Reply via email to