zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper issue #451: ZOOKEEPER-2184: Zookeeper Client should re-resolve hos...
Date Fri, 23 Mar 2018 11:18:11 GMT
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/451
  
    @afine @ijuma I've finished refactoring of StaticHostProvider.
    
    The implementation follows that I explained in my email as **Option-3**:
    
    > - Do not cache IPs, 
    > - Shuffle the names and resolve with getAllByName() every time when next() is called,
    > - Use getAllByName(), but shuffle the list and return the first IP to properly handle
hostnames associated with multiple IPs,
    > - JDK's built-in caching will prevent name servers from being flooded and will do
the re-resolution automatically when cache expires,
    
    The `Resolver` interface which is also introduced in this patch is the solution for the
problem that @afine raised: to properly mock out the `getAllByName()` call in unit tests.


---

Mime
View raw message