yaooqinn commented on code in PR #41785:
URL: https://github.com/apache/spark/pull/41785#discussion_r1302410752


##########
common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java:
##########
@@ -276,10 +277,19 @@ public void initChannel(SocketChannel ch) {
     // Connect to the remote server
     long preConnect = System.nanoTime();
     ChannelFuture cf = bootstrap.connect(address);
-    if (!cf.await(conf.connectionCreationTimeoutMs())) {
+
+    if (connCreateTimeout <= 0) {
+      cf.awaitUninterruptibly();

Review Comment:
   Thank you @JoshRosen. The fix looks good to me.
   
   While considering the usage of `await` and `awaitUninterruptibly`, I 
consulted the Netty documentation 
(https://netty.io/4.0/api/io/netty/channel/ChannelFuture.html) which 
recommended the use of `awaitUninterruptibly` in all its GOOD examples. So...



-- 
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