chia7712 commented on code in PR #13285: URL: https://github.com/apache/kafka/pull/13285#discussion_r1123098018
########## core/src/main/scala/kafka/network/SocketServer.scala: ########## @@ -141,8 +142,8 @@ class SocketServer(val config: KafkaConfig, } newGauge("MemoryPoolAvailable", () => memoryPool.availableMemory) newGauge("MemoryPoolUsed", () => memoryPool.size() - memoryPool.availableMemory) - newGauge(s"${DataPlaneAcceptor.MetricPrefix}ExpiredConnectionsKilledCount", () => SocketServer.this.synchronized { - val dataPlaneProcessors = dataPlaneAcceptors.asScala.values.flatMap(a => a.processors) + newGauge(s"${DataPlaneAcceptor.MetricPrefix}ExpiredConnectionsKilledCount", () => { + val dataPlaneProcessors = dataPlaneAcceptors.values.asScala.flatMap(a => a.processors.asScala) Review Comment: > We cannot convert processors to Scala since it transforms it into a mutable ArrayBuffer. pardon me. why we can't use "mutable ArrayBuffer" here? -- 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