You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by 往事如烟 <ho...@qq.com> on 2016/06/03 04:55:00 UTC

回复: put data and then get it , but it returns null in sometimes

thanks for your answer, I don't use configure file, so almost we used the default value, only set some items as follows:


CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>("testName");
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());
cacheCfg.setBackups(1);


there are 2 servers  and 1 client in my test;


and I alse find that invokes putAll method to put 5 records to cache, and then invoke cache.size() return less than 5, we expect 5;


furthermore,  we are test them in linux environment;


How can I solve this question ? 








------------------ 原始邮件 ------------------
发件人: "Denis Magda";<dm...@gridgain.com>;
发送时间: 2016年6月3日(星期五) 中午12:35
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes



Hi,

Do you set CacheConfiguration.readFromBackup to “true”? Please share full configuration of your cache.


—
Denis

On Jun 3, 2016, at 6:06 AM, 往事如烟 <ho...@qq.com> wrote:

Hi all,
     I have encountered a very strange problem, described as follows:
     first ,  put(1, 2) to the cache in sync mode and the cache is atomic mode; 
     then, I immediately invoke get(1) in sync mode to get key=1, expect it returns 2;
     however,  it returns null;
    
    this question is random appearance,  but I have encountered a lot times;
    
    Is there anybody have encountered this question,  And how I can solve it ? 


   Thanks!

Re: put data and then get it , but it returns null in sometimes

Posted by Denis Magda <dm...@gridgain.com>.
Don’t think that it will be easy track back all the fixes that have been done since that time.

Actually both versions are binary compatible, so everything should work fine for you after you switch to 1.6.0.
Also you can write a test that proves that the issue exists in 1.4.0 and fixed in 1.6.0 and switch to the new version after that.

—
Denis

> On Jun 3, 2016, at 8:15 AM, 往事如烟 <ho...@qq.com> wrote:
> 
> thank you, and is there any similar problem before ? I want to know how it is produced ? 
> Yes , we can upgrade it, but because we made a lot of development based on version 1.4.0, 
>  so it will take a lot of time to upgrade to 1.6.0
> 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Alexey Goncharuk";<al...@gmail.com>;
> 发送时间: 2016年6月3日(星期五) 中午1:08
> 收件人: "user"<us...@ignite.apache.org>;
> 主题: Re: put data and then get it , but it returns null in sometimes
> 
> Can you try upgrading to 1.6 and check if the problem still reproduced? There has been fixed a lot of issues in the last two versions, so it is very likely this one will go away after an upgrade.
> 
> 2016-06-02 22:06 GMT-07:00 往事如烟 <hongliping7@qq.com <ma...@qq.com>>:
> Thank you , and  we are using ignite 1.4.0 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Alexey Goncharuk";<alexey.goncharuk@gmail.com <ma...@gmail.com>>;
> 发送时间: 2016年6月3日(星期五) 中午1:02
> 收件人: "user"<user@ignite.apache.org <ma...@ignite.apache.org>>;
> 主题: Re: put data and then get it , but it returns null in sometimes
> 
> Hi,
> 
> Which version of Ignite are you using?
> 
> 2016-06-02 21:55 GMT-07:00 往事如烟 <hongliping7@qq.com <ma...@qq.com>>:
> thanks for your answer, I don't use configure file, so almost we used the default value, only set some items as follows:
> 
> CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>("testName");
> cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
> cacheCfg.setCacheMode(CacheMode.PARTITIONED);
> cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());
> cacheCfg.setBackups(1);
> 
> there are 2 servers  and 1 client in my test;
> 
> and I alse find that invokes putAll method to put 5 records to cache, and then invoke cache.size() return less than 5, we expect 5;
> 
> furthermore,  we are test them in linux environment;
> 
> How can I solve this question ? 
> 
> 
> 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Denis Magda";<dmagda@gridgain.com <ma...@gridgain.com>>;
> 发送时间: 2016年6月3日(星期五) 中午12:35
> 收件人: "user"<user@ignite.apache.org <ma...@ignite.apache.org>>;
> 主题: Re: put data and then get it , but it returns null in sometimes
> 
> Hi,
> 
> Do you set CacheConfiguration.readFromBackup to “true”? Please share full configuration of your cache.
> 
> —
> Denis
> 
>> On Jun 3, 2016, at 6:06 AM, 往事如烟 <hongliping7@qq.com <ma...@qq.com>> wrote:
>> 
>> Hi all,
>>      I have encountered a very strange problem, described as follows:
>>      first ,  put(1, 2) to the cache in sync mode and the cache is atomic mode;
>>      then, I immediately invoke get(1) in sync mode to get key=1, expect it returns 2;
>>      however,  it returns null;
>>    
>>     this question is random appearance,  but I have encountered a lot times;
>>    
>>     Is there anybody have encountered this question,  And how I can solve it ?
>> 
>>    Thanks!
> 
> 
> 


回复: put data and then get it , but it returns null in sometimes

Posted by 往事如烟 <ho...@qq.com>.
thank you, and is there any similar problem before ? I want to know how it is produced ? 
Yes , we can upgrade it, but because we made a lot of development based on version 1.4.0, 
 so it will take a lot of time to upgrade to 1.6.0




------------------ 原始邮件 ------------------
发件人: "Alexey Goncharuk";<al...@gmail.com>;
发送时间: 2016年6月3日(星期五) 中午1:08
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes



Can you try upgrading to 1.6 and check if the problem still reproduced? There has been fixed a lot of issues in the last two versions, so it is very likely this one will go away after an upgrade.

2016-06-02 22:06 GMT-07:00 往事如烟 <ho...@qq.com>:
Thank you , and  we are using ignite 1.4.0 


------------------ 原始邮件 ------------------
发件人: "Alexey Goncharuk";<al...@gmail.com>;
发送时间: 2016年6月3日(星期五) 中午1:02
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes





Hi,

Which version of Ignite are you using?


2016-06-02 21:55 GMT-07:00 往事如烟 <ho...@qq.com>:
thanks for your answer, I don't use configure file, so almost we used the default value, only set some items as follows:


CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>("testName");
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());
cacheCfg.setBackups(1);


there are 2 servers  and 1 client in my test;


and I alse find that invokes putAll method to put 5 records to cache, and then invoke cache.size() return less than 5, we expect 5;


furthermore,  we are test them in linux environment;


How can I solve this question ? 








------------------ 原始邮件 ------------------
发件人: "Denis Magda";<dm...@gridgain.com>;
发送时间: 2016年6月3日(星期五) 中午12:35
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes



Hi,

Do you set CacheConfiguration.readFromBackup to “true”? Please share full configuration of your cache.


—
Denis

On Jun 3, 2016, at 6:06 AM, 往事如烟 <ho...@qq.com> wrote:

Hi all,
     I have encountered a very strange problem, described as follows:
     first ,  put(1, 2) to the cache in sync mode and the cache is atomic mode; 
     then, I immediately invoke get(1) in sync mode to get key=1, expect it returns 2;
     however,  it returns null;
    
    this question is random appearance,  but I have encountered a lot times;
    
    Is there anybody have encountered this question,  And how I can solve it ? 


   Thanks!

Re: put data and then get it , but it returns null in sometimes

Posted by Alexey Goncharuk <al...@gmail.com>.
Can you try upgrading to 1.6 and check if the problem still reproduced?
There has been fixed a lot of issues in the last two versions, so it is
very likely this one will go away after an upgrade.

2016-06-02 22:06 GMT-07:00 往事如烟 <ho...@qq.com>:

> Thank you , and  we are using ignite 1.4.0
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Alexey Goncharuk";<al...@gmail.com>;
> *发送时间:* 2016年6月3日(星期五) 中午1:02
> *收件人:* "user"<us...@ignite.apache.org>;
> *主题:* Re: put data and then get it , but it returns null in sometimes
>
> Hi,
>
> Which version of Ignite are you using?
>
> 2016-06-02 21:55 GMT-07:00 往事如烟 <ho...@qq.com>:
>
>> thanks for your answer, I don't use configure file, so almost we used the
>> default value, only set some items as follows:
>>
>> *CacheConfiguration<Object, Object> cacheCfg = new
>> CacheConfiguration<>("testName");*
>>
>> *cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);*
>> *cacheCfg.setCacheMode(CacheMode.PARTITIONED);*
>> *cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());*
>> *cacheCfg.setBackups(1);*
>>
>> there are 2 servers  and 1 client in my test;
>>
>> and I alse find that invokes putAll method to put 5 records to cache, and
>> then invoke cache.size() return *less than 5*, we expect 5;
>>
>> furthermore,  we are test them in *linux* environment;
>>
>> How can I solve this question ?
>>
>>
>>
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "Denis Magda";<dm...@gridgain.com>;
>> *发送时间:* 2016年6月3日(星期五) 中午12:35
>> *收件人:* "user"<us...@ignite.apache.org>;
>> *主题:* Re: put data and then get it , but it returns null in sometimes
>>
>> Hi,
>>
>> Do you set CacheConfiguration.readFromBackup to “true”? Please share full
>> configuration of your cache.
>>
>> —
>> Denis
>>
>> On Jun 3, 2016, at 6:06 AM, 往事如烟 <ho...@qq.com> wrote:
>>
>> Hi all,
>>      I have encountered a very strange problem, described as follows:
>>      first ,  put(1, 2) to the cache in *sync* mode and the cache is *atomic
>> *mode;
>>      then, I immediately invoke get(1) in sync mode to get key=1, expect
>> it returns *2*;
>>      however,  it returns *null*;
>>
>>     this question is random appearance,  but I have encountered a lot
>> times;
>>
>>     Is there anybody have encountered this question,  And how I can solve
>> it ?
>>
>>    Thanks!
>>
>>
>>
>

回复: put data and then get it , but it returns null in sometimes

Posted by 往事如烟 <ho...@qq.com>.
Thank you , and  we are using ignite 1.4.0 


------------------ 原始邮件 ------------------
发件人: "Alexey Goncharuk";<al...@gmail.com>;
发送时间: 2016年6月3日(星期五) 中午1:02
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes



Hi,

Which version of Ignite are you using?


2016-06-02 21:55 GMT-07:00 往事如烟 <ho...@qq.com>:
thanks for your answer, I don't use configure file, so almost we used the default value, only set some items as follows:


CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>("testName");
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());
cacheCfg.setBackups(1);


there are 2 servers  and 1 client in my test;


and I alse find that invokes putAll method to put 5 records to cache, and then invoke cache.size() return less than 5, we expect 5;


furthermore,  we are test them in linux environment;


How can I solve this question ? 








------------------ 原始邮件 ------------------
发件人: "Denis Magda";<dm...@gridgain.com>;
发送时间: 2016年6月3日(星期五) 中午12:35
收件人: "user"<us...@ignite.apache.org>; 

主题: Re: put data and then get it , but it returns null in sometimes



Hi,

Do you set CacheConfiguration.readFromBackup to “true”? Please share full configuration of your cache.


—
Denis

On Jun 3, 2016, at 6:06 AM, 往事如烟 <ho...@qq.com> wrote:

Hi all,
     I have encountered a very strange problem, described as follows:
     first ,  put(1, 2) to the cache in sync mode and the cache is atomic mode; 
     then, I immediately invoke get(1) in sync mode to get key=1, expect it returns 2;
     however,  it returns null;
    
    this question is random appearance,  but I have encountered a lot times;
    
    Is there anybody have encountered this question,  And how I can solve it ? 


   Thanks!

Re: put data and then get it , but it returns null in sometimes

Posted by Alexey Goncharuk <al...@gmail.com>.
Hi,

Which version of Ignite are you using?

2016-06-02 21:55 GMT-07:00 往事如烟 <ho...@qq.com>:

> thanks for your answer, I don't use configure file, so almost we used the
> default value, only set some items as follows:
>
> *CacheConfiguration<Object, Object> cacheCfg = new
> CacheConfiguration<>("testName");*
>
> *cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);*
> *cacheCfg.setCacheMode(CacheMode.PARTITIONED);*
> *cacheCfg.setCacheStoreFactory(new ConfigurableCacheStoreFactory<>());*
> *cacheCfg.setBackups(1);*
>
> there are 2 servers  and 1 client in my test;
>
> and I alse find that invokes putAll method to put 5 records to cache, and
> then invoke cache.size() return *less than 5*, we expect 5;
>
> furthermore,  we are test them in *linux* environment;
>
> How can I solve this question ?
>
>
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Denis Magda";<dm...@gridgain.com>;
> *发送时间:* 2016年6月3日(星期五) 中午12:35
> *收件人:* "user"<us...@ignite.apache.org>;
> *主题:* Re: put data and then get it , but it returns null in sometimes
>
> Hi,
>
> Do you set CacheConfiguration.readFromBackup to “true”? Please share full
> configuration of your cache.
>
> —
> Denis
>
> On Jun 3, 2016, at 6:06 AM, 往事如烟 <ho...@qq.com> wrote:
>
> Hi all,
>      I have encountered a very strange problem, described as follows:
>      first ,  put(1, 2) to the cache in *sync* mode and the cache is *atomic
> *mode;
>      then, I immediately invoke get(1) in sync mode to get key=1, expect
> it returns *2*;
>      however,  it returns *null*;
>
>     this question is random appearance,  but I have encountered a lot
> times;
>
>     Is there anybody have encountered this question,  And how I can solve
> it ?
>
>    Thanks!
>
>
>