You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/08/12 04:29:16 UTC

[09/21] incubator-ignite git commit: ignite-1189: eventually fixed the deadlock

ignite-1189: eventually fixed the deadlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/67706063
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/67706063
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/67706063

Branch: refs/heads/ignite-264
Commit: 67706063d2e8d8cc3ed8d55cdfffccc0a21005c6
Parents: d78e4c8
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:34:19 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:34:19 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  6 +-
 .../IgniteCacheAtomicNodeRestartTest.java       | 92 --------------------
 2 files changed, 5 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 470efdd..14b4680 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1175,6 +1175,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             remap = true;
         }
         catch (Exception e) {
+            // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+            // an attempt to use cleaned resources.
             U.error(log, "Unexpected exception during cache update", e);
 
             res.addFailedKeys(keys, e);
@@ -2184,7 +2186,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
             }
         }
         finally {
-            // Release locks.
+            // At least RuntimeException can be thrown by the code above when GridCacheContext is cleaned and there is
+            // an attempt to use cleaned resources.
+            // That's why releasing locks in the finally block..
             for (GridCacheMapEntry entry : locked) {
                 if (entry != null)
                     UNSAFE.monitorExit(entry);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/67706063/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index caee4d0..1c4e616 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -30,96 +30,4 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
-
-    /** {@inheritDoc} */
-    @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-
-    public void testRestartWithPutTenNodesTwoBackups2() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups3() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups4() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups5() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups6() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups7() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups8() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups9() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups10() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups11() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups12() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups13() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-    public void testRestartWithPutTenNodesTwoBackups14() throws Throwable {
-        super.testRestartWithPutTenNodesTwoBackups();
-    }
-
-    @Override protected long getTestTimeout() {
-        return Long.MAX_VALUE;
-    }
-
-    @Override public void testRestart() throws Exception {
-
-    }
-
-    @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable {
-    }
-
-    @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable {
-    }
 }