apovzner commented on a change in pull request #9317: URL: https://github.com/apache/kafka/pull/9317#discussion_r494034591
########## File path: core/src/main/scala/kafka/network/SocketServer.scala ########## @@ -1447,13 +1454,33 @@ class ConnectionQuotas(config: KafkaConfig, time: Time, metrics: Metrics) extend } } + def removeSensors(): Unit = { Review comment: agreed, `close` will be consistent. About not closing ListenerConnectionQuota on ConnectionQuotas.close(): this is on broker shutdown path where KafkaServer calls metrics.close() on shutdown as well (and metrics are owned by KafkaServer), so I don't think we are leaking anything. But I think it's better to remove listener sensors on ConnectionQuotas.close() anyways, so I will make that change. ---------------------------------------------------------------- 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: us...@infra.apache.org