[
https://issues.apache.org/jira/browse/HDDS-12060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved HDDS-12060.
-------------------------------
Fix Version/s: 2.1.0
Resolution: Fixed
The pull request is now merged. Thanks, [~chiacyu] !
> Replace System.currentTimeMillis() with Time.monotonicNow() for duration
> calculation
> ------------------------------------------------------------------------------------
>
> Key: HDDS-12060
> URL: https://issues.apache.org/jira/browse/HDDS-12060
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Ivan Andika
> Assignee: Chia-Chuan Yu
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.1.0
>
>
> A lot of duration calculations are still using System.currentTimeMillis.
> However, from the description of Time.now (which calls
> System.currentTimeMillis)
> {quote}Current system time. Do not use this to calculate a duration or
> interval to sleep, because it will be broken by settimeofday. Instead, use
> monotonicNow.
> {quote}
> Therefore, we should replace them with Time.monotonicNow /
> Time.monotonicNowNanos to prevent the duration calculation being broken by
> settimeofday.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]