Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-157-debug d43074e70 -> 344fcbf85


# ignite-157-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/344fcbf8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/344fcbf8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/344fcbf8

Branch: refs/heads/ignite-157-debug
Commit: 344fcbf85c1a5c6eb96edbd0e75b249542c5845c
Parents: d43074e
Author: sboikov <sboi...@gridgain.com>
Authored: Tue Apr 28 10:37:58 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Tue Apr 28 10:37:58 2015 +0300

----------------------------------------------------------------------
 .../GridDhtPartitionsExchangeFuture.java        | 40 +++++++++++---------
 1 file changed, 23 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/344fcbf8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index e6d9d54..6c2169e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -679,38 +679,44 @@ public class GridDhtPartitionsExchangeFuture extends 
GridFutureAdapter<AffinityT
         return false; // TODO ignite-23;
     }
 
+    private static int cnt = 0;
+
     /**
      *
      */
     private void dumpPendingObjects() {
-        U.warn(log, "Failed to wait for partition release future. Dumping 
pending objects that might be the cause: " +
-            cctx.localNodeId());
+        synchronized (GridDhtPartitionsExchangeFuture.class) {
+            U.warn(log, "Failed to wait for partition release future. Dumping 
pending objects that might be the cause: " +
+                cctx.localNodeId());
 
-        U.warn(log, "Pending transactions:");
+            U.warn(log, "Pending transactions:");
 
-        for (IgniteInternalTx tx : cctx.tm().activeTransactions())
-            U.warn(log, ">>> " + tx);
+            for (IgniteInternalTx tx : cctx.tm().activeTransactions())
+                U.warn(log, ">>> " + tx);
 
-        U.warn(log, "Pending explicit locks:");
+            U.warn(log, "Pending explicit locks:");
 
-        for (GridCacheExplicitLockSpan lockSpan : 
cctx.mvcc().activeExplicitLocks())
-            U.warn(log, ">>> " + lockSpan);
+            for (GridCacheExplicitLockSpan lockSpan : 
cctx.mvcc().activeExplicitLocks())
+                U.warn(log, ">>> " + lockSpan);
 
-        U.warn(log, "Pending cache futures:");
+            U.warn(log, "Pending cache futures:");
 
-        for (GridCacheFuture<?> fut : cctx.mvcc().activeFutures())
-            U.warn(log, ">>> " + fut);
+            for (GridCacheFuture<?> fut : cctx.mvcc().activeFutures())
+                U.warn(log, ">>> " + fut);
 
-        U.warn(log, "Pending atomic cache futures:");
+            U.warn(log, "Pending atomic cache futures:");
 
-        for (GridCacheFuture<?> fut : cctx.mvcc().atomicFutures())
-            U.warn(log, ">>> " + fut);
+            for (GridCacheFuture<?> fut : cctx.mvcc().atomicFutures())
+                U.warn(log, ">>> " + fut);
 
-        TestDebugLog.addMessage("Release timeout");
+            TestDebugLog.addMessage("Release timeout");
 
-        TestDebugLog.printMessages(false);
+            if (++cnt > 3) {
+                TestDebugLog.printMessages(false);
 
-        System.exit(1);
+                System.exit(1);
+            }
+        }
     }
 
     /**

Reply via email to