ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [5/8] ignite git commit: Reduced amount of debug logging.
Date Tue, 04 Jul 2017 14:14:09 GMT
Reduced amount of debug logging.


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

Branch: refs/heads/ignite-gg-12389
Commit: 211caf15fa4d2f01ac09c7de414272b8c0d8d908
Parents: ae5ec94
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jul 4 11:21:49 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jul 4 11:21:49 2017 +0300

----------------------------------------------------------------------
 .../processors/affinity/GridAffinityAssignmentCache.java     | 8 +++++++-
 .../processors/cache/GridCachePartitionExchangeManager.java  | 8 ++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/211caf15/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 71ec3ea..a8c6c59 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -431,8 +431,10 @@ public class GridAffinityAssignmentCache {
 
     /**
      * Dumps debug information.
+     *
+     * @return {@code True} if there are pending futures.
      */
-    public void dumpDebugInfo() {
+    public boolean dumpDebugInfo() {
         if (!readyFuts.isEmpty()) {
             U.warn(log, "First 3 pending affinity ready futures [grp=" + cacheOrGrpName +
                 ", total=" + readyFuts.size() +
@@ -446,7 +448,11 @@ public class GridAffinityAssignmentCache {
                 if (++cnt == 3)
                     break;
             }
+
+            return true;
         }
+
+        return false;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/211caf15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 2b5a4ff..f07119a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -1636,6 +1636,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
             }
         }
 
+        int affDumpCnt = 0;
+
         for (CacheGroupContext grp : cctx.cache().cacheGroups()) {
             if (grp.isLocal())
                 continue;
@@ -1647,8 +1649,10 @@ public class GridCachePartitionExchangeManager<K, V> extends
GridCacheSharedMana
 
             GridAffinityAssignmentCache aff = grp.affinity();
 
-            if (aff != null)
-                aff.dumpDebugInfo();
+            if (aff != null && affDumpCnt < 5) {
+                if (aff.dumpDebugInfo())
+                    affDumpCnt++;
+            }
         }
     }
 


Mime
View raw message