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:03 UTC

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

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) {