zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkalmar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #549: ZOOKEEPER-2873 abort startup on invalid ports
Date Wed, 27 Jun 2018 08:32:19 GMT
Github user nkalmar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/549#discussion_r198407883
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -259,6 +259,11 @@ public QuorumServer(long sid, String addressStr) throws ConfigException
{
                     throw new ConfigException("Address unresolved: " + serverParts[0] + ":"
+ serverParts[2]);
                 }
     
    +            if(addr.getPort() == electionAddr.getPort()) {
    +                throw new ConfigException(
    +                        "Client and election port must be different! Please update the
configuration file on server." + sid);
    +            }
    +
    --- End diff --
    
    Good question. Well, as what I can see it is only used for test, and it is called programmatically,
so not from reading a config. The intention here was to make sure that ZK is not misconfigured.

    
    So I'm open to adding it there also, just my initial thinking was it is not necessary.



---

Mime
View raw message