[ 
https://issues.apache.org/jira/browse/HDFS-16672?focusedWorklogId=796786&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-796786
 ]

ASF GitHub Bot logged work on HDFS-16672:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Aug/22 06:37
            Start Date: 01/Aug/22 06:37
    Worklog Time Spent: 10m 
      Work Description: cxzl25 commented on PR #4598:
URL: https://github.com/apache/hadoop/pull/4598#issuecomment-1200775196

   > I don't get this improvement. It seems that `System.nanoTime()` in single 
thread then compare. Do you meet any issue here? Thanks.
   
   `System.nanoTime()`may return a negative number, the comparison here may be 
wrong.
   
   In `LeaseManager.Lease#expiredHardLimit()` we use two nanotimes to subtract. 
 This is consistent with the usage of nanoTime recommended by JDK.
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 796786)
    Time Spent: 50m  (was: 40m)

> Fix lease interval comparison in BlockReportLeaseManager
> --------------------------------------------------------
>
>                 Key: HDFS-16672
>                 URL: https://issues.apache.org/jira/browse/HDFS-16672
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: dzcxzl
>            Assignee: dzcxzl
>            Priority: Trivial
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> monotonicNowMs is generated by System.nanoTime(), direct comparison is not 
> recommended.
>  
> org.apache.hadoop.hdfs.server.blockmanagement.BlockReportLeaseManager#pruneIfExpired
> {code:java}
> if (monotonicNowMs < node.leaseTimeMs + leaseExpiryMs) {
>   return false;
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to