You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/19 14:11:15 UTC
[GitHub] [kafka] dajac commented on a change in pull request #10361: KAFKA-9189: Use MetadataCache instead of ZK during controlled shutdown
dajac commented on a change in pull request #10361:
URL: https://github.com/apache/kafka/pull/10361#discussion_r597709157
##########
File path: core/src/main/scala/kafka/server/KafkaServer.scala
##########
@@ -549,20 +548,17 @@ class KafkaServer(
try {
var remainingRetries = retries
- var prevController: Broker = null
+ var prevController: MetadataBroker = null
var ioException = false
while (!shutdownSucceeded && remainingRetries > 0) {
remainingRetries = remainingRetries - 1
// 1. Find the controller and establish a connection to it.
-
- // Get the current controller info. This is to ensure we use the most recent info to issue the
- // controlled shutdown request.
// If the controller id or the broker registration are missing, we sleep and retry (if there are remaining retries)
- zkClient.getControllerId match {
+ metadataCache.getControllerId match {
Review comment:
Should we update the `No controller registered in ZooKeeper` log below and say that there is no controller present in the metadata cache instead?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org