You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ender Ekici <en...@evam.com> on 2017/09/08 13:01:57 UTC

ignite.destroyCache() method hangs the cluster

Hi,
We have a test machine which has 8 cores with 32Gb ram.
We are using ignite 1.8.3.
On ignite there is only one cache which has 10M records (db size 7Gb~
ignite cache size 14Gb~)
We reload this cache with a cron scheduler.(Every night)

For example:
cacheName: products (alias)
realCacheName: products+oldTimestamp

-cron triggered.
-create cache with name “products+newTimestamp”
-load data from db to cache
-when loading finishes, we map the products cache to
“products+newTimestamp” and later(after 1 min) destroy the old cache;

While we measuring the cache.get() times with only one client we
encountered 4.5sec delay while ignite.destroyCache(realOldCacheName)
operation.

On our production machine (200+ core with 500Gb ram)(a couple of 100M
records of caches), this delay dramatically increases to minutes and all
ignite clients hang while destroying the cache.

what can we do to destroy cache without hanging the cluster?

Re: ignite.destroyCache() method hangs the cluster

Posted by Ender <en...@evam.com>.
Hi Again,

I've uploaded sample project on GitHub.

https://github.com/enderekici/ignitetest.git
<https://github.com/enderekici/ignitetest.git>  

Thank you.



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

Re: ignite.destroyCache() method hangs the cluster

Posted by Mikhail <mi...@gmail.com>.
Hi Ender,

I will appreciate if you share a reproducer with us, so I can file a ticket
for this problem.

Thanks,
Mikhail.



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

Re: ignite.destroyCache() method hangs the cluster

Posted by ender <en...@evam.com>.
Hi Mikhail,

Same problem still exists in ignite ver. 2.1.0#20170720-sha1:a6ca5c8a.

As a workaround, I manually clear the cache with iterating and deleting
entries before destroying cache:

IgniteCache<Object, Object> cache = ignite.cache(cachename);
            for (Cache.Entry<Object, Object> objectObjectEntry : cache) {
                cache.remove(objectObjectEntry.getKey());
            }
            ignite.destroyCache(cacheName);

cache.clear() method also blocks the cache.get operations.

Is there any better method for destroying cache without blocking?

Thank you.





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

Re: ignite.destroyCache() method hangs the cluster

Posted by Mikhail <mi...@gmail.com>.
Hi, 

You use very obsolete version, please try the latest one: 2.1

Thanks,
Mikhail.



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