tomsun28 commented on code in PR #3673: URL: https://github.com/apache/hertzbeat/pull/3673#discussion_r2285644236
########## hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/AlerterWorkerPool.java: ########## @@ -77,6 +79,21 @@ private void initNotifyExecutor() { new ThreadPoolExecutor.AbortPolicy()); } + private void initLogWorkerExecutor() { + ThreadFactory threadFactory = new ThreadFactoryBuilder() + .setUncaughtExceptionHandler((thread, throwable) -> { + log.error("Alerter logWorkerExecutor has uncaughtException."); + log.error(throwable.getMessage(), throwable); + }) + .setDaemon(true) + .setNameFormat("log-worker-%d") + .build(); + logWorkerExecutor = new ThreadPoolExecutor(4, 10, 10, TimeUnit.SECONDS, + new LinkedBlockingQueue<>(), Review Comment: hi, if the blocking queue is LinkedBlockingQueue, the thread size first will increase to 4, and then others tasks will put in the LinkedBlockingQueue, the thread size will never increase until the blocking queue is filled. -- 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: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org