Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/377#discussion_r141521002
  
    --- 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 --
    
    "no longer strictly true" - actually it still is true. If 
`Time.currentElapsedTime()` returns 0 and server Id is 0x80, this will happen. 
That's why nextSid has to be incremented in that case.


---

Reply via email to