Search code examples
datagridignite

Can Apache Ignite Continuous Queries miss some update?


We are testing Apache Ignite Continuous Queries and during the tests, we have noticed that some continuous queries misses some updates of the cache. Our use case is the following one:

  • we have a feeder (that is part of the server nodes) and that feeds 1000 caches with data every seconds
  • we have a client program (that is part of the server nodes) that opens 1000 continuous queries, 1 continuous query per cache

So, some of these continuous queries misses from times to times few updates of the cache. We were wondering whether the fact that a continuous query misses some updates of the cache was "normal".

We have also performed the test with 500, 250, 100 caches and have the same results.

Besides, we are also wondering how many caches and continuous queries can be created? Does Apache Ignite support hundred thousands of creation of caches and continuous queries?


Solution

  • Got the answer with the Ignite mailing-list (http://apache-ignite-users.70518.x6.nabble.com/Can-a-Continuous-Queries-miss-some-updates-order-td11620.html#a11623):

    Continuous Query (CQ) garanties that the order for events will be preserved per entry. For example:

    cache.put(key1, 100);
    cache.put(key2, 100);
    cache.put(key1, 200);
    cache.put(key2, 200);
    

    CQ guarantees that for key1 events will be received in the following order (1, 100) --> (1, 200) but you can got event for key2 early than for key1. Ignite doesn't have limitation on count of caches and CQ.

    Thanks Nikolai Tikhonov!