maoling created ZOOKEEPER-4036: ---------------------------------- Summary: correct the annotation/comment about the frequency of leader's ping Key: ZOOKEEPER-4036 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4036 Project: ZooKeeper Issue Type: Improvement Reporter: maoling
{code:java} // We ping twice a tick, so we only update the tick every other // iteration boolean tickSkip = true; // If not null then shutdown this leader String shutdownMessage = null; {code} >From the code, we can find it's a factual mistake. We ping half of a tick >time, not twice a tick. For example, the tickTime is 2000ms(default), we ping >every 1 s. {code:java} long start = Time.currentElapsedTime(); long cur = start; long end = start + self.tickTime / 2; while (cur < end) { wait(end - cur); cur = Time.currentElapsedTime(); } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)