[jira] [Created] (IGNITE-8035) Duplicated events in ContinuousQuery's Events Listener

2018-03-23 Thread Ruslan Gilemzyanov (JIRA)
Ruslan Gilemzyanov created IGNITE-8035:
--

 Summary: Duplicated events in ContinuousQuery's Events Listener 
 Key: IGNITE-8035
 URL: https://issues.apache.org/jira/browse/IGNITE-8035
 Project: Ignite
  Issue Type: Bug
  Components: cache
Affects Versions: 2.1
Reporter: Ruslan Gilemzyanov


We faced with bug in ContinuousQuery's EventListener work in Ignite. I wrote 
sample project to demonstrate it.

We started 2 server nodes connected to the one cache.

Topology snapshot became [ver=2, servers=2, clients=0, CPUs=4, heap=3.6GB]

I have put elements in cache (about 50 elements). Elements were distributed 
between two nodes approxiamtely in the same amount.

After pushing every element to cache we waited 100ms (to ensure that Listener 
did his work) and deleted element from cache. 

Then we stopped one node. (Topology snapshot became [ver=3, servers=1, 
clients=0, CPUs=4, heap=1.8GB])

And then some absolutely randomly chosen (deleted from cache to this moment) 
events came to other working node with status CREATED (Remind you that we 
deleted them from cache to this moment). In our case it was 5 events.

I think this is direct violation of Continuous Query's "exactly once delivery" 
contract. 

Source code here: https://github.com/ruslangm/ignite-sample

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-7662) Slow event listener's work

2018-02-09 Thread Ruslan Gilemzyanov (JIRA)
Ruslan Gilemzyanov created IGNITE-7662:
--

 Summary: Slow event listener's work
 Key: IGNITE-7662
 URL: https://issues.apache.org/jira/browse/IGNITE-7662
 Project: Ignite
  Issue Type: Wish
  Components: cache
Affects Versions: 2.2
Reporter: Ruslan Gilemzyanov


I wroted some code that can run Ignite server node and attached to it 
EventListener. Then I putted 10 elements on the cache, and for each element 
recorded a time difference between putting and catching.

*When I created one server node and put 10 elements in IgniteCache I've got 
good results. For 10 elements it was:*

ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 51 ruslangm.sample.ignite.listener.EventListener - Time diff between 
put and listener - 2 ruslangm.sample.ignite.listener.EventListener - Time diff 
between put and listener - 1 ruslangm.sample.ignite.listener.EventListener - 
Time diff between put and listener - 1 
ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 1 ruslangm.sample.ignite.listener.EventListener - Time diff between 
put and listener - 2 ruslangm.sample.ignite.listener.EventListener - Time diff 
between put and listener - 2 ruslangm.sample.ignite.listener.EventListener - 
Time diff between put and listener - 2 
ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 2 ruslangm.sample.ignite.listener.EventListener - Time diff between 
put and listener - 1

*The results were the same when I added one node* (Topology snapshot became: 
[ver=2, servers=2, clients=0, CPUs=4, heap=3.6GB]).

*But when i applied setBackups(1) to IgniteCache the results became weird:*

ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 573 ruslangm.sample.ignite.listener.EventListener - Time diff 
between put and listener - 573 ruslangm.sample.ignite.listener.EventListener - 
Time diff between put and listener - 570 
ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 571 ruslangm.sample.ignite.listener.EventListener - Time diff 
between put and listener - 571 ruslangm.sample.ignite.listener.EventListener - 
Time diff between put and listener - 571 
ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener - 571 ruslangm.sample.ignite.listener.EventListener - Time diff 
between put and listener - 561 ruslangm.sample.ignite.listener.EventListener - 
Time diff between put and listener - 560

 

*My code for creating an IgniteCache and attaching to it event listener is very 
simple:*

{{Ignite ignite = Ignition.start("ignite.xml")) CacheConfiguration cfg = new CacheConfiguration<>(); 
cfg.setCacheMode(CacheMode.PARTITIONED); 
cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); 
cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC); 
cfg.setName("myCache"); cfg.setBackups(1); IgniteCache cache = 
ignite.getOrCreateCache(cfg); ContinuousQuery query = new 
ContinuousQuery<>(); query.setLocalListener(new EventListener()); 
query.setLocal(true); QueryCursor> cursor = 
cache.query(query);}}

In my listener I just print this message:

{{ruslangm.sample.ignite.listener.EventListener - Time diff between put and 
listener }}

You can look at it on [github|https://github.com/ruslangm/ignite-sample], it is 
really so simple.

Is Ignite is really so slow in listening events when there are exist backups?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)