You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by ashishg <as...@gmail.com> on 2021/03/02 15:14:01 UTC

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/

Re: Unable to evict cache entry in all nodes synchronously

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Glad to hear that! These settings indeed seem reasonable.

Regards,
-- 
Ilya Kasnacheev


чт, 18 мар. 2021 г. в 10:04, ashishg <as...@gmail.com>:

> 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/
>

Re: Unable to evict cache entry in all nodes synchronously

Posted by ashishg <as...@gmail.com>.
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/

Re: Unable to evict cache entry in all nodes synchronously

Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <as...@gmail.com>:

> 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/
>

Re: Unable to evict cache entry in all nodes synchronously

Posted by ashishg <as...@gmail.com>.
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/

Re: Unable to evict cache entry in all nodes synchronously

Posted by ashishg <as...@gmail.com>.
Hi,

By eviction I mean that the entry in the cache is not cleared in all cluster
nodes 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/

Re: Unable to evict cache entry in all nodes synchronously

Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <as...@gmail.com>:

> 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/
>