Reputation: 6342
It looks that I can get a distributed lock through the API IgniteCache # public Lock lock(K key);
.
One thing I want to confirm is that when one process gets a lock from this object, but didn't release this lock before the process dies, will Ignite be sure that the lock that is held by the dead process be released, so that other processes that wait for the lock will get a chance to get the lock?
Upvotes: 2
Views: 1728
Reputation: 421
Ignite#reentrantLock method have boolean flag failoverSafe which means exactly what you want. If node leave topology which already acquired a locks then that the locks will be silently released.
Upvotes: 3