hachikuji commented on code in PR #12063:
URL: https://github.com/apache/kafka/pull/12063#discussion_r853339103


##########
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:
   Could this check be moved inside the `listenerRegistrationsAltered` block 
below? I'm trying to understand why they handled separately.



-- 
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

Reply via email to