You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/03 08:43:16 UTC
[1/2] ignite git commit: ignite-2008 Added test reproducing issue.
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 ae40e2de8 -> 9b60c75c6
ignite-2008 Added test reproducing issue.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f7709543
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f7709543
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f7709543
Branch: refs/heads/ignite-1.5
Commit: f7709543c7e6652dc276e38629f2f1d1315fa84e
Parents: e7298ad
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 3 10:42:15 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 3 10:42:15 2015 +0300
----------------------------------------------------------------------
.../CacheLockReleaseNodeLeaveTest.java | 51 ++++++++++++++++++++
1 file changed, 51 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f7709543/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
index 956aaef..e84fd3f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
@@ -29,9 +29,12 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.transactions.Transaction;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
/**
*
@@ -107,4 +110,52 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest {
fut2.get(5, SECONDS);
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxLockRelease() throws Exception {
+ startGrids(2);
+
+ final Ignite ignite0 = ignite(0);
+ final Ignite ignite1 = ignite(1);
+
+ final Integer key = primaryKey(ignite1.cache(null));
+
+ IgniteInternalFuture<?> fut1 = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ Transaction tx = ignite0.transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
+
+ ignite0.cache(null).get(key);
+
+ return null;
+ }
+ }, "lock-thread1");
+
+ fut1.get();
+
+ IgniteInternalFuture<?> fut2 = GridTestUtils.runAsync(new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ try (Transaction tx = ignite1.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+ log.info("Start tx lock.");
+
+ ignite1.cache(null).get(key);
+
+ log.info("Tx locked key.");
+
+ tx.commit();
+ }
+
+ return null;
+ }
+ }, "lock-thread2");
+
+ U.sleep(1000);
+
+ log.info("Stop node.");
+
+ ignite0.close();
+
+ fut2.get(5, SECONDS);
+ }
}
[2/2] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.5' into ignite-1.5
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9b60c75c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9b60c75c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9b60c75c
Branch: refs/heads/ignite-1.5
Commit: 9b60c75c62d2e352a4a65b7c5a0b17bc79499ba8
Parents: f770954 ae40e2d
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 3 10:42:50 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 3 10:42:50 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/configuration/IgniteConfiguration.java | 4 ++--
.../cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------