cmccabe commented on code in PR #12063: URL: https://github.com/apache/kafka/pull/12063#discussion_r853345314
########## core/src/main/scala/kafka/server/DynamicBrokerConfig.scala: ########## @@ -948,18 +980,18 @@ class DynamicListenerConfig(server: KafkaBroker) extends BrokerReconfigurable wi val oldListenerMap = listenersToMap(oldListeners) val listenersRemoved = oldListeners.filterNot(e => newListenerMap.contains(e.listenerName)) val listenersAdded = newListeners.filterNot(e => oldListenerMap.contains(e.listenerName)) - - // Clear SASL login cache to force re-login - if (listenersAdded.nonEmpty || listenersRemoved.nonEmpty) - LoginManager.closeAll() - - server.socketServer.removeListeners(listenersRemoved) - if (listenersAdded.nonEmpty) - server.socketServer.addListeners(listenersAdded) - - server match { - case kafkaServer: KafkaServer => kafkaServer.kafkaController.updateBrokerInfo(kafkaServer.createBrokerInfo) - case _ => + if (listenersRemoved.nonEmpty || listenersAdded.nonEmpty) { Review Comment: `listenerRegistrationsAltered` is about *registered listeners*, which may be different from *listeners*. One example is if you have a registered listener set to `PLAINTEXT://myhostname:9092`. Changing that to `PLAINTEXT://myhostname2:9092` is a registered listener change which is not possible in KRaft currently. But, you could have the *listener* change from `PLAINTEXT://0.0.0.0:9092` (listen on all interfaces) to `PLAINTEXT://myhostname:9092` (listen only on the IP associated with myhostname). *That* would be possible in kraft. And of course, we only want to alter the znode in ZK mode if the registered listeners changed. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org