Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/534#discussion_r196052286
  
    --- Diff: src/java/main/org/apache/zookeeper/client/StaticHostProvider.java 
---
    @@ -314,7 +340,7 @@ public InetSocketAddress next(long spinDelay) {
                     addr = nextHostInReconfigMode();
                     if (addr != null) {
                        currentIndex = serverAddresses.indexOf(addr);
    -                   return addr;                
    +                   return resolve(addr);
    --- End diff --
    
    IMHO JVM caching is overkill too. It's not application's responsibility to 
deal with DNS re-resolution, because it shouldn't happen in failure scenarios. 
On the flipside to avoid DNS server flooding some caching in the app would be 
reasonable and JVM is a standard way of doing that.


---

Reply via email to