kamalcph commented on code in PR #17793:
URL: https://github.com/apache/kafka/pull/17793#discussion_r1845022036
##########
core/src/main/scala/kafka/server/DynamicBrokerConfig.scala:
##########
@@ -840,6 +847,43 @@ class BrokerDynamicThreadPool(server: KafkaBroker) extends
BrokerReconfigurable
}
}
+
+class RemoteLogDynamicThreadPool(server: KafkaBroker) extends
BrokerReconfigurable with Logging {
+ override def reconfigurableConfigs: Set[String] = Set(
+ RemoteLogManagerConfig.REMOTE_LOG_MANAGER_COPIER_THREAD_POOL_SIZE_PROP,
+ RemoteLogManagerConfig.REMOTE_LOG_MANAGER_EXPIRATION_THREAD_POOL_SIZE_PROP,
+ RemoteLogManagerConfig.REMOTE_LOG_READER_THREADS_PROP)
+
+ override def validateReconfiguration(newConfig: KafkaConfig): Unit = {
+ DynamicThreadPool.validateReconfiguration(server.config, newConfig)
+ }
+
+ override def reconfigure(oldConfig: KafkaConfig, newConfig: KafkaConfig):
Unit = {
+ val remoteLogManager = server.remoteLogManagerOpt
+ if (newConfig.remoteLogCopierThreads != oldConfig.remoteLogCopierThreads) {
+ val oldValue = oldConfig.remoteLogCopierThreads
+ val newValue = newConfig.remoteLogCopierThreads
+ remoteLogManager.get.resizeCopierThreadPool(newValue)
+ info(s"Dynamic remote log manager config:
${RemoteLogManagerConfig.REMOTE_LOG_MANAGER_COPIER_THREAD_POOL_SIZE_PROP}
updated, " +
Review Comment:
The info log statement is not required as we already have a log inside
`resizeCopierThreadPool`
--
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]