Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-80 9b9b48a57 -> 604e38fa3


#IGNITE-80 Debug


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

Branch: refs/heads/ignite-80
Commit: 604e38fa30bd5d14a3b66ec443dbf45b281bf5a0
Parents: 9b9b48a
Author: Alexey Goncharuk <agoncha...@gridgain.com>
Authored: Tue Apr 14 12:19:52 2015 -0700
Committer: Alexey Goncharuk <agoncha...@gridgain.com>
Committed: Tue Apr 14 12:19:52 2015 -0700

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLockFuture.java   | 17 +++++++++++++----
 .../cache/distributed/near/GridNearLockFuture.java |  3 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604e38fa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index e945e44..a61096d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -635,6 +635,9 @@ public final class GridDhtLockFuture<K, V> extends 
GridCompoundIdentityFuture<Bo
      * @return {@code True} if locks have been acquired.
      */
     private boolean checkLocks() {
+        if (!pendingLocks.isEmpty())
+            GridDebug.debug("Pending locks for DHT lock future [lockVer=" + 
lockVer + ", pending=" + pendingLocks + ']');
+
         return pendingLocks.isEmpty();
     }
 
@@ -887,12 +890,18 @@ public final class GridDhtLockFuture<K, V> extends 
GridCompoundIdentityFuture<Bo
                             it.set(addOwned(req, e));
                         }
 
-                        add(fut); // Append new future.
+                        if (!F.isEmpty(req.keys())) {
+                            add(fut); // Append new future.
 
-                        if (log.isDebugEnabled())
-                            log.debug("Sending DHT lock request to DHT node 
[node=" + n.id() + ", req=" + req + ']');
+                            if (log.isDebugEnabled())
+                                log.debug("Sending DHT lock request to DHT 
node [node=" + n.id() + ", req=" + req + ']');
 
-                        cctx.io().send(n, req, cctx.ioPolicy());
+                            GridDebug.debug("Sending DHT lock request to DHT 
node [node=" + n.id() + ", req=" + req + ']');
+
+                            cctx.io().send(n, req, cctx.ioPolicy());
+                        }
+                        else
+                            GridDebug.debug("Will not send lock request to DHT 
node: " + tx);
                     }
                     catch (IgniteCheckedException e) {
                         // Fail the whole thing.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604e38fa/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 84da367..a6c84fe 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
@@ -536,6 +536,9 @@ public final class GridNearLockFuture<K, V> extends 
GridCompoundIdentityFuture<B
                                 log.debug("Lock is still not acquired for 
entry (will keep waiting) [entry=" +
                                     cached + ", fut=" + this + ']');
 
+                            GridDebug.debug("Lock is still not acquired for 
entry (will keep waiting) [entry=" +
+                                cached + ", lockVer=" + lockVer + ']');
+
                             return false;
                         }
 

Reply via email to