You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2019/01/24 22:51:00 UTC

[jira] [Created] (HBASE-21774) do not use currentMillis to measure intervals

Sergey Shelukhin created HBASE-21774:
----------------------------------------

             Summary: do not use currentMillis to measure intervals
                 Key: HBASE-21774
                 URL: https://issues.apache.org/jira/browse/HBASE-21774
             Project: HBase
          Issue Type: Bug
            Reporter: Sergey Shelukhin


I've noticed it in a few places in the code... 

currentMillis can go backwards and have other artifacts.
nanoTime should be used for intervals unless it's both the case that the calls are frequent and nanoTime will result in perf overhead, and also that artifacts from negative intervals and such are relatively harmless or possible to work around in the code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)