zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #377: [ZOOKEEPER-2901] TTL Nodes don't work with Serv...
Date Tue, 26 Sep 2017 22:24:42 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/377#discussion_r141200124
  
    --- Diff: src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java ---
    @@ -84,6 +84,9 @@ public static long initializeNextSession(long id) {
             long nextSid;
             nextSid = (Time.currentElapsedTime() << 24) >>> 8;
             nextSid =  nextSid | (id <<56);
    +        if (nextSid == EphemeralType.CONTAINER_EPHEMERAL_OWNER) {
    +            ++nextSid;  // this is an unlikely edge case, but check it just in case
    --- End diff --
    
    This makes me nervous but I can't think of a reason why it wont work. It may be worth
changing the comment on this method because it is no longer strictly true. 


---

Mime
View raw message