You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/10/18 09:33:48 UTC

[GitHub] [ozone] ayushtkn commented on a change in pull request #2693: HDDS-5794. The misleading "No available thread in pool for past * sencond" log message in DN StateContext

ayushtkn commented on a change in pull request #2693:
URL: https://github.com/apache/ozone/pull/2693#discussion_r730742018



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
##########
@@ -616,16 +620,20 @@ public void execute(ExecutorService service, long time, TimeUnit unit)
       }
 
       if (!isThreadPoolAvailable(service)) {
-        long count = threadPoolNotAvailableCount.getAndIncrement();
-        if (count % getLogWarnInterval(conf) == 0) {
-          LOG.warn("No available thread in pool for past {} seconds.",
-              unit.toSeconds(time) * (count + 1));
+        long count = threadPoolNotAvailableCount.incrementAndGet();
+        long unavailableTime = threadPoolNotAvailableTimeSum.addAndGet(
+            lastHeartbeatSent.get() - System.currentTimeMillis());

Review comment:
       I am not able to understand this calculation of `unavailableTime`
   If the lastHeartbeatSent was at 5.
   ThreadPool goes unavailable at 8. So the value we set is 5-8=(-3) Negative 3?
   In the next iteration say it is now 11, & thread pool isn't available we set -3 -11 = -15 Negative 15?
   The pool isn't available from 5 to 11? so should 6 right?
   @ChenSammi Can you explain a bit more about the logic here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org