ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "往事如烟" <honglipi...@qq.com>
Subject there is a bug for IgniteCache.removeAll()
Date Wed, 08 Jun 2016 07:51:48 GMT
the removeAll of IgniteCache class is defined as follow:

and we test it using the following code in PATITIONED mode(1 client, 2 servers, all processes
in the same host, ATOMIC mode):

for (int i = 0; i < 10000; ++i)
    cache.put(1, contact);
    assertEquals(contact, cache.get(1));

the result is always failed , which means that we put key=1 and can't get it,  for example,
when we loop at i = 42, then 
cache.get(1) == null;

we track this bug for a long time,  finally we find that the removeAll operation is not complete
synchronization,  ignite use one thread to generate all keys to DataStreamer, and another
thread execute remove opertation from DataStreamer;  so when removeAll operation is finished,
but the data may not have been removed;

so, if client send a put request before that servers execute remove operation, when servers
received put request, find that the put request version(GridCacheVersion) is smaller than
the current version, and then servers ignore this put request;  also there are debug log as

so how can we resolved this bug ? 

ps : we use ignite1.4.0 version
View raw message