splett2 commented on a change in pull request #11586:
URL: https://github.com/apache/kafka/pull/11586#discussion_r800194330



##########
File path: clients/src/main/java/org/apache/kafka/common/network/Selector.java
##########
@@ -1144,7 +1149,11 @@ public void close() {
         public SelectorMetrics(Metrics metrics, String metricGrpPrefix, 
Map<String, String> metricTags, boolean metricsPerConnection) {
             this.metrics = metrics;
             this.metricTags = metricTags;
-            this.metricsPerConnection = metricsPerConnection;
+            if (metricsPerConnection) {
+                this.connectionMetrics = new ConcurrentHashMap<>();

Review comment:
       Agreed. The Selector is advertised not to be thread safe.




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