divijvaidya commented on code in PR #13096:
URL: https://github.com/apache/kafka/pull/13096#discussion_r1067060444
##########
core/src/main/scala/kafka/server/DynamicBrokerConfig.scala:
##########
@@ -952,7 +952,7 @@ class DynamicListenerConfig(server: KafkaBroker) extends
BrokerReconfigurable wi
oldAdvertisedListeners: Map[ListenerName, EndPoint],
newAdvertisedListeners: Map[ListenerName, EndPoint]
): Boolean = {
- if (oldAdvertisedListeners.size != newAdvertisedListeners.size) return true
+ if (oldAdvertisedListeners.sizeCompare(newAdvertisedListeners) != 0)
return true
Review Comment:
FYI reviewers -
Comparison of two iterables. Reduces comparison time complexity from
O(this.size + that.size) to O(this.size min that.size)
--
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]