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 2017/05/22 15:12:40 UTC

[12/50] [abbrv] ignite git commit: Fixed deadlock (lockEntires sometimes acquires topology.writeLock).

Fixed deadlock (lockEntires sometimes acquires topology.writeLock).


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

Branch: refs/heads/ignite-5075-pds
Commit: 601722a3937bbc4d1305436d36739519ca645f5e
Parents: 9b7c4ac
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Tue May 16 16:26:50 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Tue May 16 16:26:50 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java         | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/601722a3/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 d287e3b..52968bd 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
@@ -1717,7 +1717,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         try {
             // 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 = null;
+            List<GridDhtCacheEntry> locked = lockEntries(req, req.topologyVersion());;
 
             Collection<IgniteBiTuple<GridDhtCacheEntry, GridCacheVersion>> deleted = null;
 
@@ -1740,8 +1740,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                     if (req.topologyLocked() || !needRemap(req.topologyVersion(), top.topologyVersion())) {
                         ctx.shared().database().ensureFreeSpace(ctx.memoryPolicy());
 
-                        locked = lockEntries(req, req.topologyVersion());
-
                         boolean hasNear = ctx.discovery().cacheNearNode(node, name());
 
                         // Assign next version for update inside entries lock.