turboFei commented on a change in pull request #27943: [SPARK-31179] Fast fail the connection while last connection failed in fast fail time window URL: https://github.com/apache/spark/pull/27943#discussion_r401327864
########## File path: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ########## @@ -121,18 +126,22 @@ public MetricSet getAllMetrics() { /** * Create a {@link TransportClient} connecting to the given remote host / port. * - * We maintains an array of clients (size determined by spark.shuffle.io.numConnectionsPerPeer) + * We maintain an array of clients (size determined by spark.shuffle.io.numConnectionsPerPeer) * and randomly picks one to use. If no client was previously created in the randomly selected * spot, this function creates a new client and places it there. * + * We also maintain a last connection failed time of these clients and a fast fail time window + * based on io retry wait time. If this connection request can be retried and the last connection + * failed time of these clients in the fast fail time window, fail this connection directly. + * * Prior to the creation of a new TransportClient, we will execute all * {@link TransportClientBootstrap}s that are registered with this factory. * * This blocks until a connection is successfully established and fully bootstrapped. * * Concurrency: This method is safe to call from multiple threads. */ - public TransportClient createClient(String remoteHost, int remotePort) + public TransportClient createClient(String remoteHost, int remotePort, boolean withRetry) Review comment: thanks, have named this variable to `fastFail` and add java doc and comments. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org