HDFS-16672. Fix lease interval comparison in BlockReportLeaseManager (#4598). Contributed by dzcxzl.

Reviewed-by: He Xiaoqiao <hexiaoqiao@apache.org>
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org
This commit is contained in:
cxzl25 2023-04-26 04:41:11 +08:00 committed by Ayush Saxena
parent 919c3f615b
commit 4d052a2456
No known key found for this signature in database
GPG Key ID: D09AE71061AB564D
1 changed files with 1 additions and 1 deletions

View File

@ -267,7 +267,7 @@ class BlockReportLeaseManager {
private synchronized boolean pruneIfExpired(long monotonicNowMs,
NodeData node) {
if (monotonicNowMs < node.leaseTimeMs + leaseExpiryMs) {
if (monotonicNowMs - node.leaseTimeMs < leaseExpiryMs) {
return false;
}
LOG.info("Removing expired block report lease 0x{} for DN {}.",