You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/24 16:08:00 UTC

[jira] [Updated] (HDDS-6374) Incorrect queueTime metrics of ReplicationTask

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

ASF GitHub Bot updated HDDS-6374:
---------------------------------
    Labels: pull-request-available  (was: )

> Incorrect queueTime metrics of ReplicationTask
> ----------------------------------------------
>
>                 Key: HDDS-6374
>                 URL: https://issues.apache.org/jira/browse/HDDS-6374
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Janus Chow
>            Assignee: Janus Chow
>            Priority: Major
>              Labels: pull-request-available
>
> The current logic to calculate the queue time of a ReplicationTask is as follows:
> {code:java}
> (Instant.now().getNano() - task.getQueued().getNano()) / 1_000_000; {code}
> But Instant's nano only records the nanosecond part, it's like operation of mod.
> For example, if nano part of getQueued is 500_000_000,  and queue time is 600ms
> {code:java}
> // code placeholder
> getQueued                500_000_000
> in Queue                    600_000_000
> getProcessed            1100_000_000
> call getNano()             100_000_000{code}
> Then the result of the code mentioned above would be (100_000_000 - 500_000_000) / 1_000_000, which is -400.
>  
> This ticket is to solve this bug by using Duration.between to get the correct queueTime.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org