[
https://issues.apache.org/jira/browse/ZOOKEEPER-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547782#comment-13547782
]
Todd Lipcon commented on ZOOKEEPER-1616:
----------------------------------------
Admittedly I was looking at a git checkout I haven't updated since July, but as
Marshall said, it doesn't look like it's committed anywhere. Happy to close
this as dup, but someone should probably commit ZOOKEEPER-1366.
[~xieliang007], supports_monotonic_clock is true if dlsym("clock_gettime")
returns non-NULL. According to some googling, it's been available since glibc
2.2 (or maybe earlier) and even early Linux 2.4. So I don't think anyone's
running ZooKeeper on a system that wouldn't support it.
> time calculations should use a monotonic clock
> ----------------------------------------------
>
> Key: ZOOKEEPER-1616
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1616
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: Todd Lipcon
>
> We recently had an issue with ZooKeeper sessions acting strangely due to a
> bad NTP setup on a set of hosts. Looking at the code, ZK seems to use
> System.currentTimeMillis to measure durations or intervals in many places.
> This is bad since that time can move backwards or skip ahead by several
> minutes. Instead, it should use System.nanoTime (or a wrapper such as Guava's
> Stopwatch class)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira