Randgalt commented on a change in pull request #832: ZOOKEEPER-2503:do a hard 
constraints on the number of myid which must be between 1 and 255
URL: https://github.com/apache/zookeeper/pull/832#discussion_r266876255
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 ##########
 @@ -721,6 +721,10 @@ private void setupMyId() throws IOException {
             throw new IllegalArgumentException("serverid " + myIdString
                     + " is not a number");
         }
+        //myid must be in [0, 255]
+        if (serverId < 0 || serverId > 255) {
 
 Review comment:
   Yes - this is that whole can of worms fixed in ZOOKEEPER-2901. The max 
ServerId is determined by whether or not TTL nodes are enabled via 
`zookeeper.extendedTypesEnabled` - the docs now stipulate: `IMPORTANT: if you 
enable extended features such as TTL Nodes ... the id must be between 1 and 254 
due to internal limitations.`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to