You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is slow -- always >5s.
If you use GODEBUG=netdns=go, this is fast.
I was debugging the difference between how librdkafka uses getaddr info and how Go uses getaddrinfo.
librdkafka uses a single flag, AI_ADDRCONFIG. Go uses this const which, with the mask, ends up being AI_CANONNAME.
If I change this line to 0x400 to match AI_ADDRCONFIG, the cgo resolver is fast.
I don't really understand the ramifications of the 0x1407 mask, nor which flag should be used when -- but it is odd that this specific single flag that is used forces getaddrinfo to always take 5s, whereas a different flag incantation is fast (and the pure Go resolver is also fast).
Please close this issue if this cannot be / wont be addressed, but I hope this is enough information to go on and to potentially fix something.
The text was updated successfully, but these errors were encountered: