d8tltanc commented on a change in pull request #8683: URL: https://github.com/apache/kafka/pull/8683#discussion_r439609952
########## File path: clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java ########## @@ -158,9 +165,16 @@ public InetAddress currentAddress(String id) throws UnknownHostException { */ public void disconnected(String id, long now) { NodeConnectionState nodeState = nodeState(id); - nodeState.state = ConnectionState.DISCONNECTED; nodeState.lastConnectAttemptMs = now; - updateReconnectBackoff(nodeState); + nodeState.failedAttempts++; + nodeState.reconnectBackoffMs = reconnectBackoff.term(nodeState.failedAttempts - 1); + if (nodeState.state == ConnectionState.CONNECTING) { + nodeState.connectionSetupTimeoutMs = connectionSetupTimeout.term(nodeState.failedAttempts); Review comment: Correct. I'll add a new class property to record connection failures separately. ---------------------------------------------------------------- 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