[
https://issues.apache.org/jira/browse/HDFS-16672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17585241#comment-17585241
]
ASF GitHub Bot commented on HDFS-16672:
---------------------------------------
Hexiaoqiao commented on PR #4598:
URL: https://github.com/apache/hadoop/pull/4598#issuecomment-1228234743
Sorry for the late response. But I did not get why System.nanoTime() may
return a negative number. Do you mind to offer any jdk information? Thanks.
> System.nanoTime()may return a negative number, the comparison here may be
wrong.
> 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]