[ https://issues.apache.org/jira/browse/ZOOKEEPER-2503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410083#comment-15410083 ]
Dan Benediktson commented on ZOOKEEPER-2503: -------------------------------------------- Honestly, it's probably for the best to break those hypothetical existing configurations, since in some ways they are already broken. It sounds like the behavior would result in truncation down to one byte of effective server ID, and from personal experience, I can say that if two servers are running with the same Server ID in an ensemble it can have weird results. We had a configuration issue in one of our ensembles at one point where two servers had been misconfigured to use the same ServerId, which the Leader happily allows, and which we think resulted in duplicate session IDs getting handed out to two different sessions, and then to strange side-effects down the line. We actually have a fix in our Zookeeper fork to make LearnerHandler block any server from being allowed in if the Learner is trying to claim a Server ID that's already in use by another Learner, to prevent this configuration problem from sneaking in again. > Inconsistency between myid documentation and implementation > ----------------------------------------------------------- > > Key: ZOOKEEPER-2503 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2503 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.4.9, 3.5.2 > Reporter: Michael Han > Fix For: 3.5.3, 3.4.10 > > > In ZK documentation, we have: > "The myid file consists of a single line containing only the text of that > machine's id. So myid of server 1 would contain the text "1" and nothing > else. The id must be unique within the ensemble and should have a value > between 1 and 255." > This however is not enforced in code, which should be fixed either in > documentation that we remove the restriction of the range 1-255 or in code we > enforce such constraint. > Discussion thread: > http://zookeeper-user.578899.n2.nabble.com/Is-myid-actually-limited-to-1-255-td7581270.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)