alamar commented on a change in pull request #6168: IGNITE-6578 Too many 
diagnostic: Found long running cache future
URL: https://github.com/apache/ignite/pull/6168#discussion_r260267244
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
 ##########
 @@ -1856,14 +1860,17 @@ public void dumpDebugInfo(@Nullable 
GridDhtPartitionsExchangeFuture exchFut) thr
         exchWorker.dumpExchangeDebugInfo();
 
         if (!readyFuts.isEmpty()) {
-            U.warn(diagnosticLog, "First 5 pending affinity ready futures 
[total=" + readyFuts.size() + ']');
+            int warningsLimit = 
IgniteSystemProperties.getInteger(IGNITE_DIAGNOSTIC_WARN_LIMIT, 5);
+
+            U.warn(diagnosticLog, "First " + warningsLimit + " pending 
affinity ready futures [total=" +
+                readyFuts.size() + ']');
 
             int cnt = 0;
 
             for (AffinityReadyFuture fut : readyFuts.values()) {
                 U.warn(diagnosticLog, ">>> " + fut);
 
-                if (++cnt == 5)
+                if (++cnt == warningsLimit)
 
 Review comment:
   It looks like we can't have IGNITE_DIAGNOSTIC_WARN_LIMIT = 0 since at least 
one message will always be printed. Can we move this check up (while avoiding 
off-by-one error) so that we could completely disable those messages with 
IGNITE_DIAGNOSTIC_WARN_LIMIT=0? Here and below, everywhere where it is checked.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to