Unable to evict cache entry in all nodes synchronously

classic Classic list List threaded Threaded
7 messages Options
ashishg ashishg
Reply | Threaded
Open this post in threaded view
|

Unable to evict cache entry in all nodes synchronously

Hi,

I am using Ignite v2.9.1 and trying to evict cache entry via Http API call.
The other cluster nodes should also have the cache entry evicted before the
API response is returned, but this is not happening.

Following methods were used to evict cache entry in a synchronous manner but
was unsuccessful:
IgniteCache.clear(key), IgniteCache.remove(key), IgniteCache.removeAll(key)


CacheConfiguration:
PartitionLossPolicy = IGNORE
CacheWriteSynchronizationMode = FULL_SYNC
Backups = 2
CacheMode = REPLICATED
CacheAtomicityMode = ATOMIC


Shouldn't FULL_SYNC guarantee synchronous eviction?


Thanks,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

Hello!

What do you mean by eviction here? How do you determine that it isn't happening?

Regards,
--
Ilya Kasnacheev


вт, 2 мар. 2021 г. в 18:14, ashishg <[hidden email]>:
Hi,

I am using Ignite v2.9.1 and trying to evict cache entry via Http API call.
The other cluster nodes should also have the cache entry evicted before the
API response is returned, but this is not happening.

Following methods were used to evict cache entry in a synchronous manner but
was unsuccessful:
IgniteCache.clear(key), IgniteCache.remove(key), IgniteCache.removeAll(key)


CacheConfiguration:
PartitionLossPolicy = IGNORE
CacheWriteSynchronizationMode = FULL_SYNC
Backups = 2
CacheMode = REPLICATED
CacheAtomicityMode = ATOMIC


Shouldn't FULL_SYNC guarantee synchronous eviction?


Thanks,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ashishg ashishg
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

This post was updated on .
Hi,

By eviction I mean that the entry in the cache is not cleared in all cluster
nodes synchronously when we call IgniteCache.clear(key), IgniteCache.remove(key) or
IgniteCache.removeAll(key)

I have a web service which has an API to update database and clear cache
entries related to it via calls to one of the the above methods of
IgniteCache. Once this API is successful the kafka event is sent to the
cluster nodes, which should retrieve the latest data from the database due
to cache miss.

Unfortunately the updates done on database is not reflected as the old value
is returned by the cache.
But when I add a delay of 3s, it gets reflected in all cluster nodes.


Thanks,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ashishg ashishg
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

In reply to this post by ilya.kasnacheev
Can we get an acknowledgement from all cluster nodes that the cache has been
updated or cleared?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

Hello!

Do you have a reproducer which shows that entries are still contained in cache after remove/clear?

Regards,
--
Ilya Kasnacheev


пт, 5 мар. 2021 г. в 08:22, ashishg <[hidden email]>:
Can we get an acknowledgement from all cluster nodes that the cache has been
updated or cleared?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ashishg ashishg
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

This post was updated on .
Hi Ilya,

Thanks for response. I am able to achieve FULL_SYNC now with cache
update/clear. I am suspecting one of the timeouts value as the culprit:

Previous config of TcpCommunication SPI:
failureDetectionTimeoutEnabled = false
ConnectTimeout = 30000
SocketWriteTimeout = 5000
MaxConnectTimeout = 120000

Current config of TcpCommunication SPI with FULL_SYNC working as expected:
failureDetectionTimeoutEnabled = true
FailureDetectionTimeout = 60000


Thanks,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Unable to evict cache entry in all nodes synchronously

Hello!

Glad to hear that! These settings indeed seem reasonable.

Regards,
--
Ilya Kasnacheev


чт, 18 мар. 2021 г. в 10:04, ashishg <[hidden email]>:
Hi Ilya,

Thanks for response. I am able to achieve FULL_SYNC now which cache
update/clear. I am suspecting one of the timeouts value as the culprit:

Previous config of TcpCommunication SPI:
failureDetectionTimeoutEnabled = false
ConnectTimeout = 30000
SocketWriteTimeout = 5000
MaxConnectTimeout = 120000

Current config of TcpCommunication SPI with FULL_SYNC working as expected:
failureDetectionTimeoutEnabled = true
FailureDetectionTimeout = 60000


Thanks,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/