Jackie-Jiang commented on code in PR #17466:
URL: https://github.com/apache/pinot/pull/17466#discussion_r2677876398


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/dispatch/QueryDispatcher.java:
##########
@@ -514,6 +514,22 @@ private DispatchClient 
getOrCreateDispatchClient(QueryServerInstance queryServer
     return _dispatchClientMap.computeIfAbsent(hostnamePort, k -> new 
DispatchClient(hostname, port, _tlsConfig));
   }
 
+  /**
+   * Reset the connection backoff for a server. When the GRPC channel enters a 
TRANSIENT_FAILURE state from
+   * connection failures, it will fast fail requests and reconnect with 
exponential backoff. This method
+   * resets the backoff so servers that have recovered can be reconnected to 
immediately.
+   */
+  public void resetClientConnectionBackoff(ServerInstance serverInstance) {
+    String hostname = serverInstance.getHostname();
+    int port = serverInstance.getQueryServicePort();
+    String hostnamePort = String.format("%s_%d", hostname, port);

Review Comment:
   (minor) Extract a common method for this. To reduce garbage, we can also 
consider making the key a `Pair<String, Integer>`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to