Fix DNS lookup issue for pure IPv6 addresses in URLs (#10331)
*Problem: getDnsCachedAddress() always returns empty string if the hostname only has IPv6 addresses *Root cause: Array hostinfo[] is redeclared in code section for IPv6, so the real lookup result never returns. *How to reproduce: You can reproduce this issue even you don't have pure IPv6 environment 1. Assign a IPv6 address for your default net device sudo ip -6 addr add 2401::1234/128 dev ${netdev} 2. Add the address to /etc/hosts with a dummy hostname, for example 2401::1234/128 ipv6host 3. Create external table using the dummy hostname create external table test_ext_ipv6(a int) location('gpfdist://ipv6host:8080/data_file') format 'csv'; 4. Launch gpfdist 5. Run test SQL select * from test_ext_ipv6 Then an error will be reported with an empty address in url: ERROR: connection with gpfdist failed for "gpfdist://ipv6host:8080/data_file", effective url: "http://:8080/data_file" Co-authored-by: NPeifeng Qiu <pqiu@pivotal.io>
Showing
想要评论请 注册 或 登录