[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14525152#comment-14525152
 ] 

Rakesh R commented on ZOOKEEPER-2171:
-------------------------------------

Thanks a lot [~rgs] for taking care this. Also, its nice to see a clean build 
with the changes/patch:).

+1 latest patch looks pretty good to me apart from the below comments.

I could see few more occurrences of {{.getHostName}} in unit tests and 
leader-election recipe, IMHO its good to consider these also.
{code}
org.apache.zookeeper.test.StaticHostProviderTest.java
String hostname = next.getHostName();

org.apache.zookeeper.test.ReconfigTest.java
Assert.assertEquals("Mismatches QuorumAddress!",
                getNumericalAddrPort(qs.addr.getHostName() + ":" + 
qs.addr.getPort()),
                getAddrPortFromBean(beanName, "QuorumAddress") );

org.apache.zookeeper.recipes.leader.LeaderElectionSupport.java
return leaderOffers.get(0).getHostName();
{code}

> avoid reverse lookups in QuorumCnxManager
> -----------------------------------------
>
>                 Key: ZOOKEEPER-2171
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>            Reporter: Raul Gutierrez Segales
>            Assignee: Raul Gutierrez Segales
>             Fix For: 3.5.1, 3.6.0
>
>         Attachments: ZOOKEEPER-2171.patch, ZOOKEEPER-2171.patch, 
> ZOOKEEPER-2171.patch, ZOOKEEPER-2171.patch
>
>
> Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
> getHostName() calls in QCM. Besides the overhead, these can cause problems 
> when mixed with failing/mis-configured DNS servers.
> It would be nice to reduce them, if that doesn't affect operational 
> correctness. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to