[jira] [Updated] (IGNITE-835) IgniteCache.lock is broken for PARTITIONED cache without near cache.
[ https://issues.apache.org/jira/browse/IGNITE-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vyacheslav Koptilin updated IGNITE-835: --- Fix Version/s: 2.8 > IgniteCache.lock is broken for PARTITIONED cache without near cache. > > > Key: IGNITE-835 > URL: https://issues.apache.org/jira/browse/IGNITE-835 > Project: Ignite > Issue Type: Bug > Components: cache >Reporter: Vladimir Ozerov >Assignee: Semen Boikov >Priority: Major > Labels: Muted_test > Fix For: 2.8 > > > Steps to reproduce: > 1) Go to GridCacheLockAbstractTest > 2) Add the test source below. > 3) Make sure to disable near cache > (GridCacheLockAbstractTest.cacheConfiguration() -> > setNearConfiguration(null)). > 4) Run GridCachePartitionedLockSelfTest.testLockReentrancy() and observe > assertion failure. > 5) Enable near cache back and re-run the test. Observe that now it pass. > {code} > public void testLockReentrancy() throws Throwable { > for (int i = 10; i < 100; i++) { > System.out.println("Key: " + i); > final int i0 = i; > final Lock lock = cache1.lock(i); > lock.lockInterruptibly(); > try { > final AtomicReference err = new AtomicReference<>(); > Thread t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > lock.lock(); > lock.unlock(); > t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > } > finally { > lock.unlock(); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (IGNITE-835) IgniteCache.lock is broken for PARTITIONED cache without near cache.
[ https://issues.apache.org/jira/browse/IGNITE-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Goncharuk updated IGNITE-835: Assignee: (was: Alexey Goncharuk) > IgniteCache.lock is broken for PARTITIONED cache without near cache. > > > Key: IGNITE-835 > URL: https://issues.apache.org/jira/browse/IGNITE-835 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: sprint-2 >Reporter: Vladimir Ozerov > Labels: Muted_test > > Steps to reproduce: > 1) Go to GridCacheLockAbstractTest > 2) Add the test source below. > 3) Make sure to disable near cache > (GridCacheLockAbstractTest.cacheConfiguration() -> > setNearConfiguration(null)). > 4) Run GridCachePartitionedLockSelfTest.testLockReentrancy() and observe > assertion failure. > 5) Enable near cache back and re-run the test. Observe that now it pass. > {code} > public void testLockReentrancy() throws Throwable { > for (int i = 10; i < 100; i++) { > System.out.println("Key: " + i); > final int i0 = i; > final Lock lock = cache1.lock(i); > lock.lockInterruptibly(); > try { > final AtomicReference err = new AtomicReference<>(); > Thread t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > lock.lock(); > lock.unlock(); > t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > } > finally { > lock.unlock(); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (IGNITE-835) IgniteCache.lock is broken for PARTITIONED cache without near cache.
[ https://issues.apache.org/jira/browse/IGNITE-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov updated IGNITE-835: --- Priority: Major (was: Critical) > IgniteCache.lock is broken for PARTITIONED cache without near cache. > > > Key: IGNITE-835 > URL: https://issues.apache.org/jira/browse/IGNITE-835 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: sprint-2 >Reporter: Vladimir Ozerov >Assignee: Alexey Goncharuk > Labels: Muted_test > > Steps to reproduce: > 1) Go to GridCacheLockAbstractTest > 2) Add the test source below. > 3) Make sure to disable near cache > (GridCacheLockAbstractTest.cacheConfiguration() -> > setNearConfiguration(null)). > 4) Run GridCachePartitionedLockSelfTest.testLockReentrancy() and observe > assertion failure. > 5) Enable near cache back and re-run the test. Observe that now it pass. > {code} > public void testLockReentrancy() throws Throwable { > for (int i = 10; i < 100; i++) { > System.out.println("Key: " + i); > final int i0 = i; > final Lock lock = cache1.lock(i); > lock.lockInterruptibly(); > try { > final AtomicReference err = new AtomicReference<>(); > Thread t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > lock.lock(); > lock.unlock(); > t = new Thread(new Runnable() { > @Override public void run() { > try { > assert !lock.tryLock(); > assert !lock.tryLock(100, TimeUnit.MILLISECONDS); > assert !cache1.lock(i0).tryLock(); > assert !cache1.lock(i0).tryLock(100, > TimeUnit.MILLISECONDS); > } > catch (Throwable e) { > err.set(e); > } > } > }); > t.start(); > t.join(); > if (err.get() != null) > throw err.get(); > } > finally { > lock.unlock(); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)