Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hello,
First of all, some context about the issue and why it became quite apparent to me:
- I'm using the native zookeeper client on linux
- I'm not declaring -DTHREADED
- My zookeeper ensemble is made of server names that need to be resolved
- The ensemble and DNS servers are "next" to each other
- My client is "far" and uses an unreliable network path that can drop UDP requests
For each run in client's main loop, all servers in ensemble are resolved, even if no change in servers list occurred (zookeeper_interest .. update_addrs .. resolve_hosts).
In my situation, DNS requests could timeout and would trigger a reconnection to ensemble.
Please find attached a patch that would prevent DNS queries when hostname was not changed.
Best regards,
Attachments
Attachments
Issue Links
- duplicates
-
ZOOKEEPER-1998 C library calls getaddrinfo unconditionally from zookeeper_interest
- Closed