You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/07 15:56:43 UTC

[GitHub] [kafka] edoardocomar commented on a change in pull request #10649: KAFKA-12762: Use connection timeout when polling the network for new …

edoardocomar commented on a change in pull request #10649:
URL: https://github.com/apache/kafka/pull/10649#discussion_r628334323



##########
File path: clients/src/main/java/org/apache/kafka/clients/ClientUtils.java
##########
@@ -107,7 +108,9 @@ public static ChannelBuilder createChannelBuilder(AbstractConfig config, Time ti
 
     static List<InetAddress> resolve(String host, HostResolver hostResolver) throws UnknownHostException {
         InetAddress[] addresses = hostResolver.resolve(host);
-        return filterPreferredAddresses(addresses);
+        List<InetAddress> result= filterPreferredAddresses(addresses);
+        log.debug("Resolved host {} as {}", host, result.stream().map(i -> i.getHostAddress()).collect(Collectors.toList()));

Review comment:
       added a guard

##########
File path: clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java
##########
@@ -105,11 +105,13 @@ public boolean isBlackedOut(String id, long now) {
     public long connectionDelay(String id, long now) {
         NodeConnectionState state = nodeState.get(id);
         if (state == null) return 0;

Review comment:
       thanks for spotting




-- 
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:
users@infra.apache.org