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

Germán Blanco commented on ZOOKEEPER-1096:
------------------------------------------

Thanks a lot for your comments Flavio!
bq. 1. Please add documentation.
I will as soon as I learn how to do it. If you could please point me to e.g. a 
paragraph that tells me how to do it or a JIRA that includes documentation that 
will make things faster, otherwise I will look for it.
bq. 2. Why are we using system properties and not the config file to set this 
up?
Because of my understanding of Patrick Hunt's comment above: 
[#comment-13137642]. But I don't mind to change it to the config file if that 
is better.
bq. 3. Please with parenthesis with if/else blocks, even if there is a single 
statement currently.
OK
bq. 4. I don't find it very elegant to catch an exception to determine that we 
need to return false. Also, I'd rather not catch a generic exception, but 
instead catch the precise exception we are expecting in the case the property 
is not there.
That is just copied from getSnapCount and getGlobalOutstandingLimit already 
there in the same class. I don't mind changing it, but then I guess it would 
make sense to change it also in the other two methods, right?
bq. Would it make sense to have the java properties configuration value for 
leader election in 3.5.0?
The feature of listening only on the configured IP address is present already 
for 3.5.0 in trunk, although only for the leader election port. However, in 
this case, there is no configuration option. That is, the server only listens 
on the IP that is in the configuration file and there is no way to set an 
option so that it listens on all IPs for that port which is what versions 3.4.5 
and before used to do. Should there be a configuration option to 
"listenOnAllIPs" for 3.5.0 as the patch proposes for branch 3.4?
                
> Leader communication should listen on specified IP, not wildcard address
> ------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1096
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1096
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.3.3, 3.4.0
>            Reporter: Jared Cantwell
>            Assignee: Jared Cantwell
>            Priority: Minor
>             Fix For: 3.5.0, 3.4.6
>
>         Attachments: ZOOKEEPER-1096_branch3.4.patch, ZOOKEEPER-1096.patch, 
> ZOOKEEPER-1096.patch, ZOOKEEPER-1096.patch
>
>
> Server should specify the local address that is used for leader communication 
> and leader election (and not use the default of listening on all interfaces). 
>  This is similar to the clientPortAddress parameter that was added a year 
> ago.  After reviewing the code, we can't think of a reason why only the port 
> would be used with the wildcard interface, when servers are already 
> connecting specifically to that interface anyway.
> I have submitted a patch, but it does not account for all leader election 
> algorithms.
> Probably should have an option to toggle this, for backwards compatibility, 
> although it seems like it would be a bug if this change broke things.
> There is some more information about making it an option here:
> http://mail-archives.apache.org/mod_mbox/hadoop-zookeeper-dev/201008.mbox/%[email protected]%3E

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to