Hello! I have discussed this issue, and it looks that you should expect duplicate entries. You can see some entries in ScanQuery and also get them later in ContinuousQuery callback.
So you have to be ready for this. Regards, -- Ilya Kasnacheev пт, 30 нояб. 2018 г. в 19:54, Sobolewski, Krzysztof < [email protected]>: > I will take a look, thanks! > > But, upon further investigation, it appears that there is no isolation > whatsoever between the initial query and the listener in ContinuousQuery. > The initial query can pick up entries added after it started and which had > been already sent to the local listener. This way the entry is reported > twice, and hence the duplicates. This is regardless of the type of the > initial query (ScanQuery or SqlQuery). This reduces the usefulness of > ContinuousQuery a lot, because we have to find out a way to rule out these > duplicates, which is difficult and can incur a significant overhead. > > So my follow-up question is this: is it behaving as designed, or is there > some mechanism to prevent these duplicates from happening? > -KS > > > From: Ilya Kasnacheev [mailto:[email protected]] > Sent: 30 listopada 2018 14:02 > To: [email protected] > Subject: Re: Continuous queries and duplicates > > Hello! > > There should be isolation in AI 2.7 as an experimental feature. > > Regards, > -- > Ilya Kasnacheev > > > пн, 26 нояб. 2018 г. в 12:53, Sobolewski, Krzysztof < > [email protected]>: > Thanks. This is a little disappointing. ScanQuery would probably work, but > it’s not as efficient (can’t use indexes etc.). Are there any plans to > enable isolation on SqlQuery? > -KS > > From: Ilya Kasnacheev [mailto:[email protected]] > Sent: 26 listopada 2018 08:01 > To: [email protected] > Subject: Re: Continuous queries and duplicates > > Hello! > > SQL queries have no isolation currently so it is not possible to avoid the > problem that you described. You could try switching to ScanQuery, see if it > helps; or learning to deal with duplicates. > > Regards, > -- > Ilya Kasnacheev > > > пт, 23 нояб. 2018 г. в 19:25, Sobolewski, Krzysztof < > [email protected]>: > Hi, > > I'm wanting to use a ContinuousQuery and there is a slight issue with how > it transitions from the initial query to the notifications phase. It turns > out that if there are additions to the cache happening while the continuous > query runs, an entry may be reported twice - once by the initial query and > once by the listener. This is confirmed by experiment, BTW :) The initial > query in this case is an SqlQuery. > > So my question is: is this intentional? Or is it a bug? Is there something > I can do to mitigate this? Is this is an issue of isolation level? > > Thanks a lot for any pointers :) > -KS > > ________________________________ > > Your Personal Data: We may collect and process information about you that > may be subject to data protection laws. For more information about how we > use and disclose your personal data, how we protect your information, our > legal basis to use your information, your rights and who you can contact, > please refer to: www.gs.com/privacy-notices< > http://www.gs.com/privacy-notices> > > ________________________________________ > > Your Personal Data: We may collect and process information about you that > may be subject to data protection laws. For more information about how we > use and disclose your personal data, how we protect your information, our > legal basis to use your information, your rights and who you can contact, > please refer to: www.gs.com/privacy-notices > > ________________________________ > > Your Personal Data: We may collect and process information about you that > may be subject to data protection laws. For more information about how we > use and disclose your personal data, how we protect your information, our > legal basis to use your information, your rights and who you can contact, > please refer to: www.gs.com/privacy-notices< > http://www.gs.com/privacy-notices> >
