Should we introduce a local cache to reduce round-trips to DNS server ? I don't think that we should do it because of this patch (although in general it might be a good idea):
The reevaluation is done in this case primarily in cases when the set of servers changes, such as adding a new server, so using a cached mapping doesn't make sense, if anything I would probably clear cached mappings when updateServerList is invoked. In general this seems to me out of scope of this feature. Alex On Feb 7, 2012, at 3:12 PM, "Ted Yu" <[email protected]<mailto:[email protected]>> wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3781/#review4882 ----------------------------------------------------------- Please remove white spaces in new code. /src/java/main/org/apache/zookeeper/ZooKeeper.java <https://reviews.apache.org/r/3781/#comment10756> Should read 'new comma separated' /src/java/main/org/apache/zookeeper/client/StaticHostProvider.java <https://reviews.apache.org/r/3781/#comment10768> Should we introduce a local cache to reduce round-trips to DNS server ? - Ted On 2012-02-07 22:42:04, Alexander Shraer wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3781/ ----------------------------------------------------------- (Updated 2012-02-07 22:42:04) Review request for zookeeper. Summary ------- https://issues.apache.org/jira/browse/ZOOKEEPER-1355 Diffs ----- /src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java 1236340 /src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java 1236340 /src/java/main/org/apache/zookeeper/ZooKeeper.java 1236340 /src/java/main/org/apache/zookeeper/client/HostProvider.java 1236340 /src/java/main/org/apache/zookeeper/client/StaticHostProvider.java 1236340 /src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml 1236340 Diff: https://reviews.apache.org/r/3781/diff Testing ------- new tests included as part of the patch Thanks, Alexander
