0xffff-zhiyan commented on code in PR #20481:
URL: https://github.com/apache/kafka/pull/20481#discussion_r2438237449
##########
core/src/main/scala/kafka/server/KafkaRequestHandler.scala:
##########
@@ -214,7 +226,18 @@ class KafkaRequestHandlerPool(
}
def createHandler(id: Int): Unit = synchronized {
- runnables += new KafkaRequestHandler(id, brokerId, aggregateIdleMeter,
threadPoolSize, requestChannel, apis, time, nodeName)
+ runnables += new KafkaRequestHandler(
+ id,
+ brokerId,
+ aggregateIdleMeter,
+ perPoolIdleMeter,
+ threadPoolSize,
+ requestChannel,
+ apis,
+ time,
+ nodeName,
+ )
+ aggregateThreads.getAndIncrement()
Review Comment:
I think we could add a `deleteHandler()`method where we remove handler and
decrement the aggregate threads, and then `resizeThreadPool()` would simply
call `createHandler()` and `deleteHandler()` as needed.
--
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]