Ngone51 commented on a change in pull request #27943: [SPARK-31179] Fast fail
the connection while last connection failed in the last retry IO wait
URL: https://github.com/apache/spark/pull/27943#discussion_r397618892
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java
##########
@@ -112,6 +114,7 @@ public TransportClientFactory(
}
this.metrics = new NettyMemoryMetrics(
this.pooledAllocator, conf.getModuleName() + "-client", conf);
+ fastFailTimeWindow = conf.ioRetryWaitTimeMs() * 0.95;
Review comment:
I just have another idea to make code a bit more simpler:
```suggestion
fastFailTimeWindow = if (conf.maxIORetries() > 0)
conf.ioRetryWaitTimeMs() * 0.95 else 0;
```
Then, we can simply the if condition below and call `conf.maxIORetries()`
only once.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]