You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Denis Mekhanikov <dm...@gmail.com> on 2018/07/31 10:19:04 UTC

Local Continuous Query

Igniters,

As you may know, *ContinuousQuery
<https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/ContinuousQuery.html>*
class
extends the *Query
<https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/Query.html>
*class, so *setLocal *method is applicable to *ContinuousQuery *as well.
Behaviour of such queries is not documented at all, and it's unclear, how
they should work.

In particular, local continuous queries work differently for partitioned
and replicated caches, even if a node contains all backup partitions.
Listener for a local continuous query is invoked only for primary
partitions in case of a partitioned cache, and for all partitions in case
of a replicated cache.

Is it supposed to work like this?

I agree to leave this behaviour untouched, but it certainly needs to be
documented.

Denis

Re: Local Continuous Query

Posted by Valentin Kulichenko <va...@gmail.com>.
Denis,

I think this is correct behavior. If you deploy a local query on a single
node with a REPLICATED cache, you expect to be notified with all the
updates. This is not the case for PARTITIONED caches.

-Val

On Tue, Jul 31, 2018 at 3:19 AM Denis Mekhanikov <dm...@gmail.com>
wrote:

> Igniters,
>
> As you may know, *ContinuousQuery
> <
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/ContinuousQuery.html
> >*
> class
> extends the *Query
> <
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/Query.html
> >
> *class, so *setLocal *method is applicable to *ContinuousQuery *as well.
> Behaviour of such queries is not documented at all, and it's unclear, how
> they should work.
>
> In particular, local continuous queries work differently for partitioned
> and replicated caches, even if a node contains all backup partitions.
> Listener for a local continuous query is invoked only for primary
> partitions in case of a partitioned cache, and for all partitions in case
> of a replicated cache.
>
> Is it supposed to work like this?
>
> I agree to leave this behaviour untouched, but it certainly needs to be
> documented.
>
> Denis
>