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 Thu, 09 Jun 2016 06:55:15 GMT
Thank you very much!


Yes, we set the write order mode to PRIMARY,  then the test is passed,  thanks again, 




------------------ 原始邮件 ------------------
发件人: "Semyon Boikov";<sboikov@gridgain.com>;
发送时间: 2016年6月9日(星期四) 下午2:01
收件人: "user"<user@ignite.apache.org>; 

主题: Re: there is a bug for IgniteCache.removeAll()



Hi,

This is known issue for ATOMIC cache with CLOCK write order mode, please try set write order
mode = PRIMARY (CacheConfiguration.setAtomicWriteOrderMode(CacheAtomicWriteOrderMode.PRIMARY)).


On Wed, Jun 8, 2016 at 10:51 AM, 往事如烟 <hongliping7@qq.com> wrote:
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.removeAll();
    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
follow:



 
so how can we resolved this bug ? 


ps : we use ignite1.4.0 version
Mime
View raw message