You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Noam Liran (JIRA)" <ji...@apache.org> on 2015/11/26 10:21:10 UTC
[jira] [Created] (IGNITE-2008) Abandoned locks are not released
when nodes leave the grid
Noam Liran created IGNITE-2008:
----------------------------------
Summary: Abandoned locks are not released when nodes leave the grid
Key: IGNITE-2008
URL: https://issues.apache.org/jira/browse/IGNITE-2008
Project: Ignite
Issue Type: Bug
Affects Versions: ignite-1.4
Environment: Ubuntu 12.04, Ignite 1.4, Java 1.8.0_40-b26 (HotSpot 64-Bit)
Reporter: Noam Liran
Hi,
We're starting to use Ignite in one of our environments and we've encountered some strange behaviour in one of our test cases.
# Start two nodes at the same time.
# Each nodes should initialize a cache with the following parameters:
## Cache mode: REPLICATED / PARTITIONED
## Atomicity mode: TRANSACTIONAL
# Both nodes run the following code:
{code}
System.out.println("Sleeping before..");
Thread.sleep(5000);
List<Lock> locks = new ArrayList<>();
System.out.println("Acquiring...");
for (int lockId = 0; lockId < 4; lockId++) {
String lockName = "LOCK_" + lockId;
Lock lock = cache.lock(lockName);
locks.add(lock);
lock.lock();
}
System.out.println("Acquired!");
Thread.sleep(20000);
System.out.println("Done");
{code}
# Node 1 acquires all the relevant locks and waits a while.
# Node 2 tries to acquire the locks and is blocked.
# Node 1 eventually quits while holding the locks.
# Node 2 never gains control of the locks even though they're abandoned.
When we try the same with a looped tryLock everything seems to work.
Our Ignite configuration is pretty straightforward:
# Regular TCP discovery
# No checkpointing SPI
# No collision SPI
# Always failover SPI
# CONTINUOUS deployment mode
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)