rajinisivaram commented on a change in pull request #8999:
URL: https://github.com/apache/kafka/pull/8999#discussion_r452040424



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java
##########
@@ -443,13 +444,13 @@ public boolean isConnectionSetupTimeout(String id, long 
now) {
     }
 
     /**
-     * Return the Set of nodes whose connection setup has timed out.
+     * Return the List of nodes whose connection setup has timed out.
      * @param now the current time in ms
      */
-    public Set<String> nodesWithConnectionSetupTimeout(long now) {
+    public List<String> nodesWithConnectionSetupTimeout(long now) {
         return connectingNodes.stream()
             .filter(id -> isConnectionSetupTimeout(id, now))
-            .collect(Collectors.toSet());
+            .collect(Collectors.toCollection(LinkedList::new));

Review comment:
       @dajac Won't this create a list regardless of whether there are timed 
out entries? Let's see whether this addresses @ijuma 's concern on the other PR.




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


Reply via email to