You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Randgalt <gi...@git.apache.org> on 2017/09/23 15:07:22 UTC
[GitHub] zookeeper pull request #378: [ZOOKEEPER-2903] Backport of ZOOKEEPER-2901 cha...
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 <jo...@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 <jo...@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
----
---
[GitHub] zookeeper issue #378: [ZOOKEEPER-2903] Backport of ZOOKEEPER-2901 changes
Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:
https://github.com/apache/zookeeper/pull/378
@Randgalt can you close this out? I applied the master PR to branch-3.5 and committed it already. I think this is taken care of, lmk otw.
---
[GitHub] zookeeper issue #378: [ZOOKEEPER-2903] Backport of ZOOKEEPER-2901 changes
Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:
https://github.com/apache/zookeeper/pull/378
@Randgalt please close this manually - the PR has been merged. thx.
---
[GitHub] zookeeper issue #378: [ZOOKEEPER-2903] Backport of ZOOKEEPER-2901 changes
Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the issue:
https://github.com/apache/zookeeper/pull/378
Attn: @phunt - I just pushed two changes:
Better docs and new reserved bits in the EphemeralType enum.
Better implementation of the testable serverId in ZooKeeperServer.
---