[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-04 Thread Dmitriy Setrakyan (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041980#comment-15041980
 ] 

Dmitriy Setrakyan commented on IGNITE-2008:
---

The EA will be out once the vote closes this Friday/Saturday. The GA will 
probably follow a couple of weeks later.

> 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
> Fix For: 1.5
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-04 Thread Roy Reznik (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041655#comment-15041655
 ] 

Roy Reznik commented on IGNITE-2008:


[~sboikov] Thanks for the fix.
Out of curiosity, is there a release date for 1.5? Or is it "it's ready when 
it's ready" kind of release?

Thanks again.

> 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
> Fix For: 1.5
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-03 Thread Semen Boikov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15037486#comment-15037486
 ] 

Semen Boikov commented on IGNITE-2008:
--

Roy,

As a workaround you can use PESSIMISTIC/REPEATABLE_READ transactions for 
disributed locks (in PESSIMISTIC mode a lock is acquired for all cache 
operations):
{code}
IgniteCache cache = ignite.cache("cache");

try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, 
REPEATABLE_READ)) {
cache.get(key); // Lock is acquired.

tx.commit(); // Lock is released.
}
{code}

> 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
>Assignee: Semen Boikov
> Fix For: 1.6
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-02 Thread Semen Boikov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15037390#comment-15037390
 ] 

Semen Boikov commented on IGNITE-2008:
--

Added test reproducing issue: CacheLockReleaseNodeLeaveTest.

> 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
>Assignee: Semen Boikov
> Fix For: 1.6
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-02 Thread Roy Reznik (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15036609#comment-15036609
 ] 

Roy Reznik commented on IGNITE-2008:


[~agura] - This is a very common use-case, when a node disconnects from the 
cluster while holding a lock. 
Is this bug something new to 1.4?
Currently it may cause the entire cluster to hang.
Why aim only for 1.6? Any workaround?

Thanks.

> 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
> Fix For: 1.6
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-02 Thread Andrey Gura (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15035552#comment-15035552
 ] 

Andrey Gura commented on IGNITE-2008:
-

Noam,

I reproduced it on current development branch (ignite-1.5).

> 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
> Fix For: 1.6
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-12-02 Thread Noam Liran (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15035546#comment-15035546
 ] 

Noam Liran commented on IGNITE-2008:


Hi Andrey, 
Out of curiosity, did you happen to try and reproduce this on (soon to be) 
1.5.0 or on the current stable version?
Thanks,
Noam

> 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
> Fix For: 1.6
>
>
> 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 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(2);
> 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)


[jira] [Commented] (IGNITE-2008) Abandoned locks are not released when nodes leave the grid

2015-11-26 Thread Andrey Gura (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15028797#comment-15028797
 ] 

Andrey Gura commented on IGNITE-2008:
-

Problem is reproducible for me.

Thanks Noam.

> 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 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(2);
> 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)