You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Lucas Bradstreet (Jira)" <ji...@apache.org> on 2019/11/14 22:58:00 UTC

[jira] [Created] (KAFKA-9193) org.apache.kafka.common.utils.Timer should use monotonic clock

Lucas Bradstreet created KAFKA-9193:
---------------------------------------

             Summary: org.apache.kafka.common.utils.Timer should use monotonic clock
                 Key: KAFKA-9193
                 URL: https://issues.apache.org/jira/browse/KAFKA-9193
             Project: Kafka
          Issue Type: Bug
            Reporter: Lucas Bradstreet


utils.Timer uses System.currentTimeMillis to implement blocking methods with timeouts. We should not rely on a non-monotonic clock and should instead switch this to Time.hiResClockMs() (which uses System.nanoTime).

When we do so we should revert [https://github.com/apache/kafka/pull/7683] which was caused by inaccuracies in our current approach (the test was good, the code is bad).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)