This is an automated email from the ASF dual-hosted git repository.

zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ba97419d20 [FLINK-38754][runtime] Avoid reverse DNS lookups when 
connecting to BlobServer
7ba97419d20 is described below

commit 7ba97419d200adef672b67c52c2b5a79f277cfda
Author: Yi Zhang <[email protected]>
AuthorDate: Wed Dec 3 11:40:39 2025 +0800

    [FLINK-38754][runtime] Avoid reverse DNS lookups when connecting to 
BlobServer
---
 .../src/main/java/org/apache/flink/runtime/blob/BlobClient.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java 
b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java
index 1b37b407f0d..16127017fa0 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java
@@ -92,10 +92,12 @@ public final class BlobClient implements Closeable {
             }
 
             // Establish the socket using the hostname and port. This avoids a 
potential issue where
-            // the
-            // InetSocketAddress can cache a failure in hostname resolution 
forever.
+            // the InetSocketAddress can cache a failure in hostname 
resolution forever.
+            // Use getHostString() instead of getHostName() to avoid 
unnecessary reverse DNS and DNS
+            // lookups when addresses are specified as IP literals. This 
improves reliability and
+            // reduces latency for each blob transfer.
             socket.connect(
-                    new InetSocketAddress(serverAddress.getHostName(), 
serverAddress.getPort()),
+                    new InetSocketAddress(serverAddress.getHostString(), 
serverAddress.getPort()),
                     clientConfig.get(BlobServerOptions.CONNECT_TIMEOUT));
             
socket.setSoTimeout(clientConfig.get(BlobServerOptions.SO_TIMEOUT));
         } catch (Exception e) {

Reply via email to