You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michi Mutsuzaki (JIRA)" <ji...@apache.org> on 2015/04/11 23:45:12 UTC

[jira] [Resolved] (ZOOKEEPER-1616) time calculations should use a monotonic clock

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michi Mutsuzaki resolved ZOOKEEPER-1616.
----------------------------------------
    Resolution: Duplicate

This is fixed in ZOOKEEPER-1366.

> 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 was sent by Atlassian JIRA
(v6.3.4#6332)