runzhiwang commented on a change in pull request #1185: URL: https://github.com/apache/hadoop-ozone/pull/1185#discussion_r456195255
########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java ########## @@ -415,7 +431,14 @@ public void execute(ExecutorService service, long time, TimeUnit unit) if (this.isEntering()) { task.onEnter(); } - task.execute(service); + + if (isThreadPoolAvailable(service)) { + task.execute(service); + } else { + LOG.warn("No available thread in pool, duration:" + Review comment: @xiaoyuyao Thanks for review and reasonable suggestion. How about add metrics for thread pool available and unavailable times ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org