[
https://issues.apache.org/jira/browse/ZOOKEEPER-3506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16934579#comment-16934579
]
Hudson commented on ZOOKEEPER-3506:
-----------------------------------
SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #703 (See
[https://builds.apache.org/job/ZooKeeper-trunk/703/])
ZOOKEEPER-3506: correct the javaDoc of the (nkalmar: rev
2c1034f8fe4e6e437f7c71478153f41180970542)
* (edit)
zookeeper-server/src/main/java/org/apache/zookeeper/server/SessionTrackerImpl.java
* (edit)
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java
> correct the SessionTrackerImpl#initializeNextSession's javaDoc about how to
> generate the sessionId
> --------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-3506
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3506
> Project: ZooKeeper
> Issue Type: Improvement
> Components: documentation, server
> Reporter: maoling
> Assignee: maoling
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.6.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
>
> {code:java}
> /**
> * Generates an initial sessionId. High order byte is serverId, next 5
> * 5 bytes are from timestamp, and low order 2 bytes are 0s.
> */
> 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
> }
> return nextSid;
> }
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)