This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push: new 9c703fa5b [net] use AF_INET hint for GetFQDN() 9c703fa5b is described below commit 9c703fa5bd476c17441361de68a518847d23e001 Author: Alexey Serbin <ale...@apache.org> AuthorDate: Thu Jul 24 12:34:34 2025 -0700 [net] use AF_INET hint for GetFQDN() I noticed that on nodes with not properly configured IPv6 DNS resolver, GetFQDN() would take quite a long time (~5 seconds) even if it eventually returns the name. This patch addresses the issue, adding the AF_INET hint for 'ai_family' when invoking getaddrinfo(). Doing so is in sync with the set of hints provided for the invocation of getaddrinfo() in the context of HostPort::ResolveAddresses(). Change-Id: Ibca0a3c1f7ad03a6f847057c38c00b42275dec8b Reviewed-on: http://gerrit.cloudera.org:8080/23213 Tested-by: Alexey Serbin <ale...@apache.org> Reviewed-by: Gabriella Lotz <lotzgabrie...@gmail.com> Reviewed-by: Ashwani Raina <araina....@gmail.com> Reviewed-by: Abhishek Chennaka <achenn...@cloudera.com> --- src/kudu/util/net/net_util.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kudu/util/net/net_util.cc b/src/kudu/util/net/net_util.cc index a6a60d19b..4c79a674b 100644 --- a/src/kudu/util/net/net_util.cc +++ b/src/kudu/util/net/net_util.cc @@ -497,6 +497,7 @@ Status GetFQDN(string* hostname) { struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; + hints.ai_family = AF_INET; hints.ai_flags = AI_CANONNAME; AddrInfo result; const string op_description =