Re: Ignite TryGet - cache data not found intermittently

2024-06-13 Thread Charlin S
Hi  Slava Koptilin,
Thank you for your email,
I am working on this changes. keep you posted.

Regards,
Charlin


On Thu, 13 Jun 2024 at 12:09, Вячеслав Коптилин 
wrote:

> Hello Charlin,
>
> As I wrote, the first option is the `full sync` mode:
> CacheConfiguration.WriteSynchronizationMode =
> CacheWriteSynchronizationMode.FullSync [1]
> The second one is disabling reading from backups:
> CacheConfiguration.ReadFromBackup = false [2]
>
> [1]
> https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.Configuration.CacheConfiguration.html#Apache_Ignite_Core_Cache_Configuration_CacheConfiguration_WriteSynchronizationMode
> [2]
> https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.Configuration.CacheConfiguration.html#Apache_Ignite_Core_Cache_Configuration_CacheConfiguration_ReadFromBackup
>
> Thanks,
> S.
>
>
> ср, 12 июн. 2024 г. в 12:58, Charlin S :
>
>> Hi  Slava Koptilin
>>
>> Thanks for your email.
>>
>> Cache configuration used at time of cache creation in C# code. Please
>> suggest me if any configuration changes required in cache level or grid
>> level
>> CacheConfiguration.CopyOnRead=false
>> CacheConfiguration.EagerTtl=true
>> CacheConfiguration.CacheMode = CacheMode.Partitioned
>> CacheConfiguration.Backups = 1
>>
>> *Client node xml bean*
>>
>> 
>> http://www.springframework.org/schema/beans";
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>xmlns:util="http://www.springframework.org/schema/util";
>>xsi:schemaLocation="http://www.springframework.org/schema/beans
>>
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>http://www.springframework.org/schema/util
>>
>> http://www.springframework.org/schema/util/spring-util.xsd";>
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>> 
>> 
>>   > class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>> 
>>   
>> 1.0.0.1:55500
>>
>> 1.0.0.2:55500
>>   
>> 
>>   
>> 
>>   
>> 
>> 
>> > class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>
>> 
>> 
>> 
>>   
>> 
>>
>> *Server node xml bean*
>>
>> 
>> http://www.springframework.org/schema/beans";
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>xmlns:util="http://www.springframework.org/schema/util";
>>xsi:schemaLocation="http://www.springframework.org/schema/beans
>>
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>http://www.springframework.org/schema/util
>>
>> http://www.springframework.org/schema/util/spring-util.xsd";>
>>   > class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
>> 
>> > factory-method="factoryOf">
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>> 
>> 
>>   > class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>> 
>>   
>> 1.0.0.1:55500
>> 1.0.0.2:55500
>>   
>> 
>>   
>> 
>>   
>> 
>>
>> 
>> 
>> > value="TestModel1"/>
>> 
>> 
>> > value="TestModel2"/>
>> 
>> 
>> > value="TestModel3"/>
>> 
>> 
>> > value="TestModel4"/>
>> 
>> 
>> > value="TestModel5"/>
>> 
>> 
>> 
>> 
>> > class="org.apache.ignite.configuration.DataStorageConfiguration">
>> 
>> > class="org.apache.ignite.configuration.DataRegionConfiguration">
>> > value="Common_Dynamic_Data_Region"/>
>> 
>> 
>> > value="RANDOM_2_LRU"/>
>> 
>> > value="65536"/>
>> 
>> 
>> 
>> 
>> 
>> > class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>> 
>> 
>> 
>> 
>>   
>> 
>>
>> Thanks & Regards,
>> Charlin
>>
>>
>>
>> On Wed, 12 Jun 2024 at 13:07

Re: Ignite TryGet - cache data not found intermittently

2024-06-12 Thread Вячеслав Коптилин
Hello Charlin,

As I wrote, the first option is the `full sync` mode:
CacheConfiguration.WriteSynchronizationMode =
CacheWriteSynchronizationMode.FullSync [1]
The second one is disabling reading from backups:
CacheConfiguration.ReadFromBackup = false [2]

[1]
https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.Configuration.CacheConfiguration.html#Apache_Ignite_Core_Cache_Configuration_CacheConfiguration_WriteSynchronizationMode
[2]
https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.Configuration.CacheConfiguration.html#Apache_Ignite_Core_Cache_Configuration_CacheConfiguration_ReadFromBackup

Thanks,
S.


ср, 12 июн. 2024 г. в 12:58, Charlin S :

> Hi  Slava Koptilin
>
> Thanks for your email.
>
> Cache configuration used at time of cache creation in C# code. Please
> suggest me if any configuration changes required in cache level or grid
> level
> CacheConfiguration.CopyOnRead=false
> CacheConfiguration.EagerTtl=true
> CacheConfiguration.CacheMode = CacheMode.Partitioned
> CacheConfiguration.Backups = 1
>
> *Client node xml bean*
>
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xmlns:util="http://www.springframework.org/schema/util";
>xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/util
>
> http://www.springframework.org/schema/util/spring-util.xsd";>
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
>class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
> 
>   
> 1.0.0.1:55500
>
> 1.0.0.2:55500
>   
> 
>   
> 
>   
> 
> 
>  class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>
> 
> 
> 
>   
> 
>
> *Server node xml bean*
>
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xmlns:util="http://www.springframework.org/schema/util";
>xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/util
>
> http://www.springframework.org/schema/util/spring-util.xsd";>
>class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
> 
>  factory-method="factoryOf">
> 
> 
> 
> 
> 
> 
>
> 
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
>class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
> 
>   
> 1.0.0.1:55500
> 1.0.0.2:55500
>   
> 
>   
> 
>   
> 
>
> 
> 
>  value="TestModel1"/>
> 
> 
>  value="TestModel2"/>
> 
> 
>  value="TestModel3"/>
> 
> 
>  value="TestModel4"/>
> 
> 
>  value="TestModel5"/>
> 
> 
> 
> 
>  class="org.apache.ignite.configuration.DataStorageConfiguration">
> 
>  class="org.apache.ignite.configuration.DataRegionConfiguration">
>  value="Common_Dynamic_Data_Region"/>
> 
> 
>  value="RANDOM_2_LRU"/>
> 
> 
> 
> 
> 
> 
> 
>  class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
> 
> 
> 
> 
>   
> 
>
> Thanks & Regards,
> Charlin
>
>
>
> On Wed, 12 Jun 2024 at 13:07, Вячеслав Коптилин 
> wrote:
>
>> Hi Charlin,
>>
>> I mean that it might be "well-known" behavior if you use `primary sync`
>> mode and the `readFromBackup` property equals `true` (which is `true` by
>> default).
>>
>> The first option, to overcome this problem, is using `full sync` mode. In
>> that case, the update request will wait for the write to complete on all
>> participating nod

Re: Ignite TryGet - cache data not found intermittently

2024-06-12 Thread Charlin S
Hi  Slava Koptilin

Thanks for your email.

Cache configuration used at time of cache creation in C# code. Please
suggest me if any configuration changes required in cache level or grid
level
CacheConfiguration.CopyOnRead=false
CacheConfiguration.EagerTtl=true
CacheConfiguration.CacheMode = CacheMode.Partitioned
CacheConfiguration.Backups = 1

*Client node xml bean*


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:util="http://www.springframework.org/schema/util";
   xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/util

http://www.springframework.org/schema/util/spring-util.xsd";>
  










  


  

  
1.0.0.1:55500

1.0.0.2:55500
  

  

  



   



  


*Server node xml bean*


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:util="http://www.springframework.org/schema/util";
   xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/util

http://www.springframework.org/schema/util/spring-util.xsd";>
  








   

  
  










  


  

  
1.0.0.1:55500
1.0.0.2:55500
  

  

  

   






































  


Thanks & Regards,
Charlin



On Wed, 12 Jun 2024 at 13:07, Вячеслав Коптилин 
wrote:

> Hi Charlin,
>
> I mean that it might be "well-known" behavior if you use `primary sync`
> mode and the `readFromBackup` property equals `true` (which is `true` by
> default).
>
> The first option, to overcome this problem, is using `full sync` mode. In
> that case, the update request will wait for the write to complete on all
> participating nodes (primary and backups).
> The second option, that can be used here, is to use 'primary sync' and set
> 'CacheConfiguration#readFromBackup' flag to false. Ignite will always send
> the request to the primary node and get the value from there.
>
> Thanks,
> S.
>
> пн, 10 июн. 2024 г. в 14:22, Вячеслав Коптилин :
>
>> Hello Charlin,
>>
>> Could you share your cache configuration? Specifically, what values are
>> used for `readFromBackup` and `writeSynchronizationMode`.
>>
>> Thanks,
>> S.
>>
>> ср, 5 июн. 2024 г. в 15:49, Charlin S :
>>
>>> Hi All,
>>> I am unable to fetch data from cache by reading by
>>> key.intermittently (very rarely).
>>>
>>> Ignite version: 2.10
>>> Cache mode: Partition
>>> Client : C# with Ignite thick client
>>>
>>> Scenario:
>>> My C# application received a request for cache data insertion @ 09:09:35
>>> and successfully insertion initiated at application side.
>>> Thereafter @ 09:10:21 C# application received a request to read cache
>>> data for the same key and Ignite TryGet could not fetch data.
>>> Note: We are able to get cache data by the same key after some time.
>>>
>>> Cache creation code
>>> var IgniteCache= IIgnite.GetCache("cacheModel")
>>> .WithExpiryPolicy(new ExpiryPolicy(
>>>  TimeSpan.FromMinutes(60),
>>>  TimeSpan.FromMinutes(60),
>>>  TimeSpan.FromMinutes(60)
>>>  ));
>>>
>>> Cache data insertion code
>>> IgniteCache.Put(cacheKey, (T)data);
>>>
>>> Cache data reading code
>>>   IgniteCache.TryGet(Key, out var value);
>>>
>>> Thanks & Regards,
>>> Charlin
>>>
>>>
>>>
>>>


Re: Ignite TryGet - cache data not found intermittently

2024-06-12 Thread Вячеслав Коптилин
Hi Charlin,

I mean that it might be "well-known" behavior if you use `primary sync`
mode and the `readFromBackup` property equals `true` (which is `true` by
default).

The first option, to overcome this problem, is using `full sync` mode. In
that case, the update request will wait for the write to complete on all
participating nodes (primary and backups).
The second option, that can be used here, is to use 'primary sync' and set
'CacheConfiguration#readFromBackup' flag to false. Ignite will always send
the request to the primary node and get the value from there.

Thanks,
S.

пн, 10 июн. 2024 г. в 14:22, Вячеслав Коптилин :

> Hello Charlin,
>
> Could you share your cache configuration? Specifically, what values are
> used for `readFromBackup` and `writeSynchronizationMode`.
>
> Thanks,
> S.
>
> ср, 5 июн. 2024 г. в 15:49, Charlin S :
>
>> Hi All,
>> I am unable to fetch data from cache by reading by
>> key.intermittently (very rarely).
>>
>> Ignite version: 2.10
>> Cache mode: Partition
>> Client : C# with Ignite thick client
>>
>> Scenario:
>> My C# application received a request for cache data insertion @ 09:09:35
>> and successfully insertion initiated at application side.
>> Thereafter @ 09:10:21 C# application received a request to read cache
>> data for the same key and Ignite TryGet could not fetch data.
>> Note: We are able to get cache data by the same key after some time.
>>
>> Cache creation code
>> var IgniteCache= IIgnite.GetCache("cacheModel")
>> .WithExpiryPolicy(new ExpiryPolicy(
>>  TimeSpan.FromMinutes(60),
>>  TimeSpan.FromMinutes(60),
>>  TimeSpan.FromMinutes(60)
>>  ));
>>
>> Cache data insertion code
>> IgniteCache.Put(cacheKey, (T)data);
>>
>> Cache data reading code
>>   IgniteCache.TryGet(Key, out var value);
>>
>> Thanks & Regards,
>> Charlin
>>
>>
>>
>>


Re: Ignite TryGet - cache data not found intermittently

2024-06-10 Thread Вячеслав Коптилин
Hello Charlin,

Could you share your cache configuration? Specifically, what values are
used for `readFromBackup` and `writeSynchronizationMode`.

Thanks,
S.

ср, 5 июн. 2024 г. в 15:49, Charlin S :

> Hi All,
> I am unable to fetch data from cache by reading by
> key.intermittently (very rarely).
>
> Ignite version: 2.10
> Cache mode: Partition
> Client : C# with Ignite thick client
>
> Scenario:
> My C# application received a request for cache data insertion @ 09:09:35
> and successfully insertion initiated at application side.
> Thereafter @ 09:10:21 C# application received a request to read cache data
> for the same key and Ignite TryGet could not fetch data.
> Note: We are able to get cache data by the same key after some time.
>
> Cache creation code
> var IgniteCache= IIgnite.GetCache("cacheModel")
> .WithExpiryPolicy(new ExpiryPolicy(
>  TimeSpan.FromMinutes(60),
>  TimeSpan.FromMinutes(60),
>  TimeSpan.FromMinutes(60)
>  ));
>
> Cache data insertion code
> IgniteCache.Put(cacheKey, (T)data);
>
> Cache data reading code
>   IgniteCache.TryGet(Key, out var value);
>
> Thanks & Regards,
> Charlin
>
>
>
>


Re: Ignite TryGet - cache data not found intermittently

2024-06-05 Thread Charlin S
Hi Pavel,
Thanking for your email.
> Perhaps something else is involved here, another thread or node changing
the value?
   I checked the application log and another thread did not do any other
operation for this particular data between this 45 seconds time gap.
   no chance for changing cache key value as this data is able to be read
after some time.
 I will keep you posted for small projects.

Thanks & Regards,
Charlin



On Thu, 6 Jun 2024 at 11:11, Pavel Tupitsyn  wrote:

> > Put and tryget are in two different methods called one after another
>
> That would be a very apparent bug in Ignite, and I don't see anything like
> that in JIRA or release notes.
> Perhaps something else is involved here, another thread or node changing
> the value?
>
> Please prepare a small project that we can run to reproduce the issue.
>
> On Wed, Jun 5, 2024 at 9:18 PM Charlin S  wrote:
>
>> Hi,
>> Put and tryget are in two different methods called one after another one
>> with some time gap based on work flow process
>>
>> We felt Ignite 2.10 okay for us.
>>
>> Thanks and Regards
>> Charlin
>>
>> On Wed, 5 Jun, 2024, 8:23 pm Pavel Tupitsyn, 
>> wrote:
>>
>>> - Do you run Put and TryGet on the same node?
>>> - Do you have a reproducer?
>>> - Ignite 2.10 was released 3 years ago, have you tried a newer version?
>>>
>>> On Wed, Jun 5, 2024 at 3:49 PM Charlin S  wrote:
>>>
 Hi All,
 I am unable to fetch data from cache by reading by
 key.intermittently (very rarely).

 Ignite version: 2.10
 Cache mode: Partition
 Client : C# with Ignite thick client

 Scenario:
 My C# application received a request for cache data insertion
 @ 09:09:35 and successfully insertion initiated at application side.
 Thereafter @ 09:10:21 C# application received a request to read cache
 data for the same key and Ignite TryGet could not fetch data.
 Note: We are able to get cache data by the same key after some time.

 Cache creation code
 var IgniteCache= IIgnite.GetCache("cacheModel")
 .WithExpiryPolicy(new ExpiryPolicy(
  TimeSpan.FromMinutes(60),
  TimeSpan.FromMinutes(60),
  TimeSpan.FromMinutes(60)
  ));

 Cache data insertion code
 IgniteCache.Put(cacheKey, (T)data);

 Cache data reading code
   IgniteCache.TryGet(Key, out var value);

 Thanks & Regards,
 Charlin






Re: Ignite TryGet - cache data not found intermittently

2024-06-05 Thread Pavel Tupitsyn
> Put and tryget are in two different methods called one after another

That would be a very apparent bug in Ignite, and I don't see anything like
that in JIRA or release notes.
Perhaps something else is involved here, another thread or node changing
the value?

Please prepare a small project that we can run to reproduce the issue.

On Wed, Jun 5, 2024 at 9:18 PM Charlin S  wrote:

> Hi,
> Put and tryget are in two different methods called one after another one
> with some time gap based on work flow process
>
> We felt Ignite 2.10 okay for us.
>
> Thanks and Regards
> Charlin
>
> On Wed, 5 Jun, 2024, 8:23 pm Pavel Tupitsyn,  wrote:
>
>> - Do you run Put and TryGet on the same node?
>> - Do you have a reproducer?
>> - Ignite 2.10 was released 3 years ago, have you tried a newer version?
>>
>> On Wed, Jun 5, 2024 at 3:49 PM Charlin S  wrote:
>>
>>> Hi All,
>>> I am unable to fetch data from cache by reading by
>>> key.intermittently (very rarely).
>>>
>>> Ignite version: 2.10
>>> Cache mode: Partition
>>> Client : C# with Ignite thick client
>>>
>>> Scenario:
>>> My C# application received a request for cache data insertion @ 09:09:35
>>> and successfully insertion initiated at application side.
>>> Thereafter @ 09:10:21 C# application received a request to read cache
>>> data for the same key and Ignite TryGet could not fetch data.
>>> Note: We are able to get cache data by the same key after some time.
>>>
>>> Cache creation code
>>> var IgniteCache= IIgnite.GetCache("cacheModel")
>>> .WithExpiryPolicy(new ExpiryPolicy(
>>>  TimeSpan.FromMinutes(60),
>>>  TimeSpan.FromMinutes(60),
>>>  TimeSpan.FromMinutes(60)
>>>  ));
>>>
>>> Cache data insertion code
>>> IgniteCache.Put(cacheKey, (T)data);
>>>
>>> Cache data reading code
>>>   IgniteCache.TryGet(Key, out var value);
>>>
>>> Thanks & Regards,
>>> Charlin
>>>
>>>
>>>
>>>


Re: Ignite TryGet - cache data not found intermittently

2024-06-05 Thread Charlin S
Hi,
Put and tryget are in two different methods called one after another one
with some time gap based on work flow process

We felt Ignite 2.10 okay for us.

Thanks and Regards
Charlin

On Wed, 5 Jun, 2024, 8:23 pm Pavel Tupitsyn,  wrote:

> - Do you run Put and TryGet on the same node?
> - Do you have a reproducer?
> - Ignite 2.10 was released 3 years ago, have you tried a newer version?
>
> On Wed, Jun 5, 2024 at 3:49 PM Charlin S  wrote:
>
>> Hi All,
>> I am unable to fetch data from cache by reading by
>> key.intermittently (very rarely).
>>
>> Ignite version: 2.10
>> Cache mode: Partition
>> Client : C# with Ignite thick client
>>
>> Scenario:
>> My C# application received a request for cache data insertion @ 09:09:35
>> and successfully insertion initiated at application side.
>> Thereafter @ 09:10:21 C# application received a request to read cache
>> data for the same key and Ignite TryGet could not fetch data.
>> Note: We are able to get cache data by the same key after some time.
>>
>> Cache creation code
>> var IgniteCache= IIgnite.GetCache("cacheModel")
>> .WithExpiryPolicy(new ExpiryPolicy(
>>  TimeSpan.FromMinutes(60),
>>  TimeSpan.FromMinutes(60),
>>  TimeSpan.FromMinutes(60)
>>  ));
>>
>> Cache data insertion code
>> IgniteCache.Put(cacheKey, (T)data);
>>
>> Cache data reading code
>>   IgniteCache.TryGet(Key, out var value);
>>
>> Thanks & Regards,
>> Charlin
>>
>>
>>
>>


Re: Ignite TryGet - cache data not found intermittently

2024-06-05 Thread Pavel Tupitsyn
- Do you run Put and TryGet on the same node?
- Do you have a reproducer?
- Ignite 2.10 was released 3 years ago, have you tried a newer version?

On Wed, Jun 5, 2024 at 3:49 PM Charlin S  wrote:

> Hi All,
> I am unable to fetch data from cache by reading by
> key.intermittently (very rarely).
>
> Ignite version: 2.10
> Cache mode: Partition
> Client : C# with Ignite thick client
>
> Scenario:
> My C# application received a request for cache data insertion @ 09:09:35
> and successfully insertion initiated at application side.
> Thereafter @ 09:10:21 C# application received a request to read cache data
> for the same key and Ignite TryGet could not fetch data.
> Note: We are able to get cache data by the same key after some time.
>
> Cache creation code
> var IgniteCache= IIgnite.GetCache("cacheModel")
> .WithExpiryPolicy(new ExpiryPolicy(
>  TimeSpan.FromMinutes(60),
>  TimeSpan.FromMinutes(60),
>  TimeSpan.FromMinutes(60)
>  ));
>
> Cache data insertion code
> IgniteCache.Put(cacheKey, (T)data);
>
> Cache data reading code
>   IgniteCache.TryGet(Key, out var value);
>
> Thanks & Regards,
> Charlin
>
>
>
>