showuon commented on code in PR #12559: URL: https://github.com/apache/kafka/pull/12559#discussion_r955857743
########## core/src/main/scala/kafka/network/SocketServer.scala: ########## @@ -1561,12 +1566,15 @@ class ConnectionQuotas(config: KafkaConfig, time: Time, metrics: Metrics) extend } private def connectionSlotAvailable(listenerName: ListenerName): Boolean = { - if (listenerCounts(listenerName) >= maxListenerConnections(listenerName)) + if (listenerCounts(listenerName) >= maxListenerConnections(listenerName)) { + warn(s"The connection count ${listenerCounts(listenerName)} for listener:$listenerName exceeds max listener connection count ${maxListenerConnections(listenerName)}") false - else if (protectedListener(listenerName)) + } else if (protectedListener(listenerName)) { true - else - totalCount < brokerMaxConnections + } else if (totalCount >= brokerMaxConnections) { + warn(s"The total connection count $totalCount exceeds broker max connection count $brokerMaxConnections") + false + } else true } Review Comment: Adds log for different cases without available connection slot -- 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