ayushtkn commented on a change in pull request #2693:
URL: https://github.com/apache/ozone/pull/2693#discussion_r731496350
##########
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(
+ System.currentTimeMillis() - lastHeartbeatSent.get());
Review comment:
Trying to decode the calculation after the change:
Say:
Last Heartbeat sent at : 5
First Unavailable at 8: So here unavailableTime = 8 - 5 = 3
Second Unavailable at 11: So here unavailableTime = 11 - 5 + 3 = 9
Shouldn't be this 6? Last heartbeat was at 5 & we are at 11, the
unavailable time should be 11-5=6
Can you help clarify
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]