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

[01/12] incubator-ignite git commit: ignite-1189: clearing grid information on stop even when grid's state is not STARTED

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-9615 3d3818d84 -> 00913e0f5


ignite-1189: clearing grid information on stop even when grid's state is not STARTED


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

Branch: refs/heads/ignite-gg-9615
Commit: ac6d75dc55eab0ce909c972a1124bf5fb42a5e3d
Parents: aec9764
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Aug 3 12:44:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Aug 3 12:44:45 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac6d75dc/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 5cbe377..d355085 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,8 +261,11 @@ public class IgnitionEx {
     public static boolean stop(@Nullable String name, boolean cancel) {
         IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-        if (grid != null && grid.state() == STARTED) {
-            grid.stop(cancel);
+        if (grid != null) {
+            IgniteState state = grid.state();
+
+            if (state == STARTED)
+                grid.stop(cancel);
 
             boolean fireEvt;
 
@@ -277,10 +280,18 @@ public class IgnitionEx {
                 }
             }
 
-            if (fireEvt)
-                notifyStateChange(grid.getName(), grid.state());
+            if (state == STARTED) {
+                if (fireEvt)
+                    notifyStateChange(grid.getName(), grid.state());
 
-            return true;
+                return true;
+            }
+            else {
+                U.warn(null, "Ignoring stopping grid instance (has not been in STARTED state): [grid=" + name +
+                    ", state=" + state + ']');
+
+                return false;
+            }
         }
 
         // We don't have log at this point...


[11/12] incubator-ignite git commit: Merge branch 'ignite-1189'

Posted by vo...@apache.org.
Merge branch 'ignite-1189'


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

Branch: refs/heads/ignite-gg-9615
Commit: cd844a7f959c79e3b5e9364ab9993f1c3d4fc91e
Parents: d9acbd1 e42f954
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:34:03 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:34:03 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  1 -
 .../dht/atomic/GridDhtAtomicCache.java          | 36 ++++++++++++++------
 2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[10/12] incubator-ignite git commit: IGNITE-1189 Removed unnecessary comment.

Posted by vo...@apache.org.
IGNITE-1189 Removed unnecessary comment.


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

Branch: refs/heads/ignite-gg-9615
Commit: e42f954f043b6690dfcc10b7eb8817194eb898e2
Parents: 6770606
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 10 13:33:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 10 13:33:28 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/configuration/IgniteConfiguration.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e42f954f/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index e1aff25..546c382 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -194,7 +194,6 @@ public class IgniteConfiguration {
 
     /** Default failure detection timeout in millis. */
     @SuppressWarnings("UnnecessaryBoxing")
-//    public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
     public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);
 
     /** Optional grid name. */


[05/12] incubator-ignite git commit: ignite-1189: 3 reproducing deadlock

Posted by vo...@apache.org.
ignite-1189: 3 reproducing 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/28c9977b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/28c9977b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/28c9977b

Branch: refs/heads/ignite-gg-9615
Commit: 28c9977bb8344f2d73c65d45656b673a9a4c634b
Parents: 3ce3c8b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 11:41:48 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 11:41:48 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java        | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28c9977b/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 d6163c2..4d73fb2 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
@@ -1153,8 +1153,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 e.printStackTrace();
             }
             catch (Exception e) {
-                if (X.hasCause(e, InterruptedException.class))
-                    U.error(log, "FUCK Interrupted", e);
+                U.error(log, "FUCK ERROR", e);
+
+                throw e;
             }
             finally {
                 if (locked != null)


[04/12] incubator-ignite git commit: ignite-1189: 2 reproducing deadlock

Posted by vo...@apache.org.
ignite-1189: 2 reproducing 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/3ce3c8b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ce3c8b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ce3c8b7

Branch: refs/heads/ignite-gg-9615
Commit: 3ce3c8b71064ff4d8abd78cd95f4678cb7a74811
Parents: efa7e99
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 10:33:57 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 10:33:57 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 40 +++-----------------
 1 file changed, 5 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ce3c8b7/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 18911fd..d6163c2 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
@@ -85,8 +85,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
     /** */
     private GridNearAtomicCache<K, V> near;
 
-    private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
-
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -992,20 +990,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         final GridNearAtomicUpdateRequest req,
         final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
     ) {
-        boolean printKeys = false;
-
-        if (lockedEntries.get() != null) {
-            for (GridDhtCacheEntry entry : lockedEntries.get())
-                U.error(log, "Locked entry [entry=" + entry + ']');
-
-            printKeys = true;
-        }
-
-        if (printKeys) {
-            for (KeyCacheObject obj : req.keys())
-                U.error(log, "Key requested: " + obj);
-        }
-
         IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
 
         if (forceFut.isDone())
@@ -1048,26 +1032,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         IgniteCacheExpiryPolicy expiry = null;
 
         try {
-            boolean printKeys = false;
-
-            if (lockedEntries.get() != null) {
-                for (GridDhtCacheEntry entry : lockedEntries.get())
-                    U.error(log, "Locked entry (2) [entry=" + entry + ']');
-
-                printKeys = true;
-            }
-
-            if (printKeys) {
-                for (KeyCacheObject obj : keys)
-                    U.error(log, "Key requested: " + obj);
-            }
-
             // If batch store update is enabled, we need to lock all entries.
             // First, need to acquire locks on cache entries, then check filter.
             List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
 
-            lockedEntries.set(locked);
-
             Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
 
             try {
@@ -1184,11 +1152,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 e.printStackTrace();
             }
+            catch (Exception e) {
+                if (X.hasCause(e, InterruptedException.class))
+                    U.error(log, "FUCK Interrupted", e);
+            }
             finally {
-                if (locked != null) {
-                    lockedEntries.set(null);
+                if (locked != null)
                     unlockEntries(locked, req.topologyVersion());
-                }
 
                 // Enqueue if necessary after locks release.
                 if (deleted != null) {


[06/12] incubator-ignite git commit: ignite-1189: 4 reproducing deadlock

Posted by vo...@apache.org.
ignite-1189: 4 reproducing 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/132562b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/132562b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/132562b4

Branch: refs/heads/ignite-gg-9615
Commit: 132562b431bc3250abe56ec48725c5ebe6083964
Parents: 28c9977
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 12:26:00 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 12:26:00 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          |  8 ++--
 .../IgniteCacheAtomicNodeRestartTest.java       | 45 ++++++++++++++++++++
 2 files changed, 48 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/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 4d73fb2..cd6e28d 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
@@ -1152,11 +1152,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 e.printStackTrace();
             }
-            catch (Exception e) {
-                U.error(log, "FUCK ERROR", e);
-
-                throw e;
-            }
             finally {
                 if (locked != null)
                     unlockEntries(locked, req.topologyVersion());
@@ -1179,6 +1174,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
             remap = true;
         }
+        catch (Exception e) {
+            U.error(log, "Unexpected exception during cache update", e);
+        }
 
         if (remap) {
             assert dhtFut == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/132562b4/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 70e6c4c..caee4d0 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
@@ -36,7 +36,52 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
         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 {


[02/12] incubator-ignite git commit: ignite-1189: trying to reproduce failures

Posted by vo...@apache.org.
ignite-1189: trying to reproduce failures


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

Branch: refs/heads/ignite-gg-9615
Commit: 6b237e119caad68474cc785c0373da8ce31011d8
Parents: ac6d75d
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Aug 3 14:45:40 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Aug 3 14:45:40 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 21 +++++---------------
 .../IgniteCacheAtomicNodeRestartTest.java       |  4 ++++
 2 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index d355085..5cbe377 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -261,11 +261,8 @@ public class IgnitionEx {
     public static boolean stop(@Nullable String name, boolean cancel) {
         IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
 
-        if (grid != null) {
-            IgniteState state = grid.state();
-
-            if (state == STARTED)
-                grid.stop(cancel);
+        if (grid != null && grid.state() == STARTED) {
+            grid.stop(cancel);
 
             boolean fireEvt;
 
@@ -280,18 +277,10 @@ public class IgnitionEx {
                 }
             }
 
-            if (state == STARTED) {
-                if (fireEvt)
-                    notifyStateChange(grid.getName(), grid.state());
-
-                return true;
-            }
-            else {
-                U.warn(null, "Ignoring stopping grid instance (has not been in STARTED state): [grid=" + name +
-                    ", state=" + state + ']');
+            if (fireEvt)
+                notifyStateChange(grid.getName(), grid.state());
 
-                return false;
-            }
+            return true;
         }
 
         // We don't have log at this point...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6b237e11/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 1c4e616..fa8898f 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,4 +30,8 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
+
+    @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+
+    }
 }


[03/12] incubator-ignite git commit: ignite-1189: reproducing deadlock

Posted by vo...@apache.org.
ignite-1189: reproducing 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/efa7e99b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/efa7e99b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/efa7e99b

Branch: refs/heads/ignite-gg-9615
Commit: efa7e99bbad76ce35a55e6ad9faa9aac8e57b5f4
Parents: 6b237e1
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 09:12:12 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 09:12:12 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 36 +++++++++++++++-
 .../IgniteCacheAtomicNodeRestartTest.java       | 43 ++++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/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 0a21979..18911fd 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
@@ -85,6 +85,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
     /** */
     private GridNearAtomicCache<K, V> near;
 
+    private ThreadLocal<List<GridDhtCacheEntry>> lockedEntries = new ThreadLocal<>();
+
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -990,6 +992,20 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         final GridNearAtomicUpdateRequest req,
         final CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
     ) {
+        boolean printKeys = false;
+
+        if (lockedEntries.get() != null) {
+            for (GridDhtCacheEntry entry : lockedEntries.get())
+                U.error(log, "Locked entry [entry=" + entry + ']');
+
+            printKeys = true;
+        }
+
+        if (printKeys) {
+            for (KeyCacheObject obj : req.keys())
+                U.error(log, "Key requested: " + obj);
+        }
+
         IgniteInternalFuture<Object> forceFut = preldr.request(req.keys(), req.topologyVersion());
 
         if (forceFut.isDone())
@@ -1032,10 +1048,26 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         IgniteCacheExpiryPolicy expiry = null;
 
         try {
+            boolean printKeys = false;
+
+            if (lockedEntries.get() != null) {
+                for (GridDhtCacheEntry entry : lockedEntries.get())
+                    U.error(log, "Locked entry (2) [entry=" + entry + ']');
+
+                printKeys = true;
+            }
+
+            if (printKeys) {
+                for (KeyCacheObject obj : keys)
+                    U.error(log, "Key requested: " + obj);
+            }
+
             // If batch store update is enabled, we need to lock all entries.
             // First, need to acquire locks on cache entries, then check filter.
             List<GridDhtCacheEntry> locked = lockEntries(keys, req.topologyVersion());
 
+            lockedEntries.set(locked);
+
             Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
 
             try {
@@ -1153,8 +1185,10 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 e.printStackTrace();
             }
             finally {
-                if (locked != null)
+                if (locked != null) {
+                    lockedEntries.set(null);
                     unlockEntries(locked, req.topologyVersion());
+                }
 
                 // Enqueue if necessary after locks release.
                 if (deleted != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efa7e99b/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 fa8898f..70e6c4c 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
@@ -31,7 +31,50 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
         return ATOMIC;
     }
 
+    /** {@inheritDoc} */
     @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
+        super.testRestartWithPutTenNodesTwoBackups();
+    }
+
+    @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 {
     }
 }


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

Posted by vo...@apache.org.
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-gg-9615
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 {
-    }
 }


[08/12] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1189

Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1189


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

Branch: refs/heads/ignite-gg-9615
Commit: d78e4c8eef921775d2d5d1fcd5adf151c3d46923
Parents: 4d528be b056a73
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:32:45 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:32:45 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractMultiNodeSelfTest.java        |   4 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java      |  21 +-
 .../apache/ignite/internal/IgniteKernal.java    |   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++++++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java    |   2 +-
 .../processors/cache/GridCacheProxyImpl.java    |  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../distributed/near/GridNearGetFuture.java     |  20 +-
 .../ignite/internal/util/IgniteUtils.java       |  16 +
 .../util/nio/GridCommunicationClient.java       |   5 +-
 .../util/nio/GridNioFinishedFuture.java         |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java    |  15 +
 .../util/nio/GridNioRecoveryDescriptor.java     |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java         |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  43 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   2 +-
 .../src/test/config/io-manager-benchmark.xml    |   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java        |  10 +-
 .../IgniteClientReconnectAbstractTest.java      |   5 +-
 .../IgniteClientReconnectCacheTest.java         |   5 +-
 .../GridDeploymentMessageCountSelfTest.java     |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java      |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java      | 131 ++++++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java    |   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java     |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite2.java       |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java    |   1 +
 .../ignite/util/TestTcpCommunicationSpi.java    |   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java    |   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 55 files changed, 1148 insertions(+), 197 deletions(-)
----------------------------------------------------------------------



[07/12] incubator-ignite git commit: ignite-1189: fixing deadlock

Posted by vo...@apache.org.
ignite-1189: fixing 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/4d528bec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4d528bec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4d528bec

Branch: refs/heads/ignite-gg-9615
Commit: 4d528becc1cd3db9d4d2d6db2053895043aa3918
Parents: 132562b
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Aug 4 13:04:35 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Aug 4 13:04:35 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 29 +++++++++++++-------
 1 file changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4d528bec/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 cd6e28d..470efdd 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
@@ -1176,6 +1176,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         }
         catch (Exception e) {
             U.error(log, "Unexpected exception during cache update", e);
+
+            res.addFailedKeys(keys, e);
+
+            completionCb.apply(req, res);
+
+            return;
         }
 
         if (remap) {
@@ -2167,19 +2173,22 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         // Enqueue entries while holding locks.
         Collection<KeyCacheObject> skip = null;
 
-        for (GridCacheMapEntry entry : locked) {
-            if (entry != null && entry.deleted()) {
-                if (skip == null)
-                    skip = new HashSet<>(locked.size(), 1.0f);
+        try {
+            for (GridCacheMapEntry entry : locked) {
+                if (entry != null && entry.deleted()) {
+                    if (skip == null)
+                        skip = new HashSet<>(locked.size(), 1.0f);
 
-                skip.add(entry.key());
+                    skip.add(entry.key());
+                }
             }
         }
-
-        // Release locks.
-        for (GridCacheMapEntry entry : locked) {
-            if (entry != null)
-                UNSAFE.monitorExit(entry);
+        finally {
+            // Release locks.
+            for (GridCacheMapEntry entry : locked) {
+                if (entry != null)
+                    UNSAFE.monitorExit(entry);
+            }
         }
 
         // Try evict partitions.


[12/12] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-9615

Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-9615


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

Branch: refs/heads/ignite-gg-9615
Commit: 00913e0f56e315f346afac27f702a8201bfb5302
Parents: 3d3818d cd844a7
Author: ptupitsyn <pt...@gridgain.com>
Authored: Mon Aug 10 14:03:49 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Mon Aug 10 14:03:49 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  1 -
 .../dht/atomic/GridDhtAtomicCache.java          | 36 ++++++++++++++------
 2 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------