akhileshchg commented on code in PR #12961:
URL: https://github.com/apache/kafka/pull/12961#discussion_r1050036052
##########
core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala:
##########
@@ -276,17 +290,38 @@ case class BrokerToControllerQueueItem(
)
class BrokerToControllerRequestThread(
- networkClient: KafkaClient,
+ networkClientFactory: ControllerInformation => KafkaClient,
metadataUpdater: ManualMetadataUpdater,
controllerNodeProvider: ControllerNodeProvider,
config: KafkaConfig,
time: Time,
threadName: String,
retryTimeoutMs: Long
-) extends InterBrokerSendThread(threadName, networkClient,
Math.min(Int.MaxValue, Math.min(config.controllerSocketTimeoutMs,
retryTimeoutMs)).toInt, time, isInterruptible = false) {
+) extends InterBrokerSendThread(threadName, null, Math.min(Int.MaxValue,
Math.min(config.controllerSocketTimeoutMs, retryTimeoutMs)).toInt, time,
isInterruptible = false) {
+
+ var isZkController = false
Review Comment:
The name makes sense. But the caching the `ControllerInformation` doesn't
give any additional benefit. In fact, it is going to be same exact condition.
So, I think it is okay to be just a boolean.
--
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]