Repository: ignite
Updated Branches:
  refs/heads/ignite-6181-2 3fc2679b3 -> c94295145


ignite-6181


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

Branch: refs/heads/ignite-6181-2
Commit: c94295145b595433df00fc9986dc6b4b71344df0
Parents: 3fc2679
Author: sboikov <sboi...@gridgain.com>
Authored: Thu Sep 21 17:24:52 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Thu Sep 21 17:24:52 2017 +0300

----------------------------------------------------------------------
 .../distributed/near/GridNearLockFuture.java    | 31 +++++++-------------
 1 file changed, 11 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c9429514/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index dcf3dfb..32f9d5b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -1013,13 +1013,9 @@ public final class GridNearLockFuture extends 
GridCacheCompoundIdentityFuture<Bo
                             GridNearCacheEntry entry = null;
 
                             try {
-                                entry = cctx.near().entryExx(
-                                    key,
-                                    topVer);
+                                entry = cctx.near().entryExx(key, topVer);
 
-                                if (!cctx.isAll(
-                                    entry,
-                                    filter)) {
+                                if (!cctx.isAll(entry, filter)) {
                                     if (log.isDebugEnabled())
                                         log.debug("Entry being locked did not 
pass filter (will not lock): " + entry);
 
@@ -1044,10 +1040,7 @@ public final class GridNearLockFuture extends 
GridCacheCompoundIdentityFuture<Bo
 
                                 if (cand != null) {
                                     if (tx == null && !cand.reentry())
-                                        cctx.mvcc().addExplicitLock(
-                                            threadId,
-                                            cand,
-                                            topVer);
+                                        
cctx.mvcc().addExplicitLock(threadId,cand,topVer);
 
                                     IgniteBiTuple<GridCacheVersion, 
CacheObject> val = entry.versionedValue();
 
@@ -1072,9 +1065,7 @@ public final class GridNearLockFuture extends 
GridCacheCompoundIdentityFuture<Bo
                                     if (val != null) {
                                         dhtVer = val.get1();
 
-                                        valMap.put(
-                                            key,
-                                            val);
+                                        valMap.put(key, val);
                                     }
 
                                     if (!cand.reentry()) {
@@ -1123,9 +1114,7 @@ public final class GridNearLockFuture extends 
GridCacheCompoundIdentityFuture<Bo
                                         distributedKeys.add(key);
 
                                         if (tx != null)
-                                            tx.addKeyMapping(
-                                                txKey,
-                                                mapping.node());
+                                            tx.addKeyMapping(txKey, 
mapping.node());
 
                                         req.addKeyBytes(
                                             key,
@@ -1138,14 +1127,16 @@ public final class GridNearLockFuture extends 
GridCacheCompoundIdentityFuture<Bo
                                     if (cand.reentry())
                                         explicit = tx != null && 
!entry.hasLockCandidate(tx.xidVersion());
                                 }
-                                else
+                                else {
+                                    if (timedOut)
+                                        return;
+
                                     // Ignore reentries within transactions.
                                     explicit = tx != null && 
!entry.hasLockCandidate(tx.xidVersion());
+                                }
 
                                 if (explicit)
-                                    tx.addKeyMapping(
-                                        txKey,
-                                        mapping.node());
+                                    tx.addKeyMapping(txKey, mapping.node());
 
                                 break;
                             }

Reply via email to