[ https://issues.apache.org/jira/browse/ZOOKEEPER-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16177837#comment-16177837 ]
ASF GitHub Bot commented on ZOOKEEPER-2903: ------------------------------------------- GitHub user Randgalt opened a pull request: https://github.com/apache/zookeeper/pull/378 [ZOOKEEPER-2903] Backport of ZOOKEEPER-2901 changes See https://github.com/apache/zookeeper/pull/377 There was a major oversight when TTL nodes were implemented. The session ID generator for each server is seeded with the configured Server ID in the high byte. TTL Nodes were using the highest bit to denote a TTL node when used in the ephemeral owner. This meant that Server IDs > 127 that created ephemeral nodes would have those nodes always considered TTL nodes (with the TTL being essentially a random number). This PR ports these changes to the 3.5.x branch You can merge this pull request into a Git repository by running: $ git pull https://github.com/Randgalt/zookeeper ZOOKEEPER-2903 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zookeeper/pull/378.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #378 ---- commit aa2fe9565306739d6987dcdd0fcb4aa9c032ecfc Author: randgalt <jor...@jordanzimmerman.com> Date: 2017-09-23T06:11:19Z There was a major oversight when TTL nodes were implemented. The session ID generator for each server is seeded with the configured Server ID in the high byte. TTL Nodes were using the highest bit to denote a TTL node when used in the ephemeral owner. This meant that Server IDs > 127 that created ephemeral nodes would have those nodes always considered TTL nodes (with the TTL being essentially a random number). This PR fixes the issue by disabling TTL Nodes by default. They must now be enabled in zoo.cfg. When TTL Nodes are enabled, the max Server ID changes from 255 to 254. This allows the high byte of a session ID stored in the ephemeral owner to use 0xFF to denote a TTL node. commit 63c21e4c57beff5fbb49a44f5ece864eb38016aa Author: randgalt <jor...@jordanzimmerman.com> Date: 2017-09-23T14:32:43Z Enabled ttl nodes in the example zoo.cfg as the cost of doing so is very low. Including a comment about the different max server id ---- > Port ZOOKEEPER-2901 to 3.5.4 > ---------------------------- > > Key: ZOOKEEPER-2903 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2903 > Project: ZooKeeper > Issue Type: Sub-task > Components: server > Affects Versions: 3.5.3 > Reporter: Jordan Zimmerman > Assignee: Jordan Zimmerman > Priority: Blocker > Fix For: 3.5.4 > > > The TTL/Server ID bug is quite serious and should be back-ported to the 3.5.x > branch -- This message was sent by Atlassian JIRA (v6.4.14#64029)