Calvin979 commented on code in PR #2606:
URL: https://github.com/apache/hertzbeat/pull/2606#discussion_r1736699823
##########
alerter/src/main/java/org/apache/hertzbeat/alert/AlerterWorkerPool.java:
##########
@@ -50,11 +50,11 @@ private void initWorkExecutor() {
.setDaemon(true)
.setNameFormat("alerter-worker-%d")
.build();
- workerExecutor = new ThreadPoolExecutor(6,
+ workerExecutor = new ThreadPoolExecutor(10,
10,
10,
TimeUnit.SECONDS,
- new SynchronousQueue<>(),
+ new LinkedBlockingQueue<>(),
Review Comment:
It is dangerous here, because the default size of `LinkedBlockingQueue` is
`Integer.MAX_VALUE`.
It may cause OOM
--
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]