Hi Alexey,

Please find the attached sample code to reproduce the deadlock (App should
be started first, then wait till cache is locked, then start the App2. App2
will fail to start Ignite)

  App.java
<http://apache-ignite-users.70518.x6.nabble.com/file/t1286/App.java>  
App2.java
<http://apache-ignite-users.70518.x6.nabble.com/file/t1286/App2.java>  

1) we lock the cache using cache.lockAll api.
2) First the locks are acquired, then as part of load routine we perform
cache.clear() (this is to clean up cache in case cache load is not
successful if an attempt is made before, or if the user wants to reload
cache manually)
3) we use custom load routine which invokes cache.putAll() (our overall
caches size is few hundred MB)
4) we have transactional caches, but we are not doing transactions actively
(only locks).

The reason we are having cache load routine as part of node startup is: if
multiple nodes are starting at the same time, then each node performs
distinct cache loads (no cache is loaded twice by multiple nodes). If all
the caches are already loaded when a new node starts, then we skip the
loading process. 

Thanks,
Naresh



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

Reply via email to