This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5af0845076f HDFS-16672. Fix lease interval comparison in 
BlockReportLeaseManager (#4598). Contributed by dzcxzl.
5af0845076f is described below

commit 5af0845076fc3fb7cd00aefc049b4708e4c3b0c0
Author: cxzl25 <cxz...@users.noreply.github.com>
AuthorDate: Wed Apr 26 04:41:11 2023 +0800

    HDFS-16672. Fix lease interval comparison in BlockReportLeaseManager 
(#4598). Contributed by dzcxzl.
    
    Reviewed-by: He Xiaoqiao <hexiaoq...@apache.org>
    Signed-off-by: Ayush Saxena <ayushsax...@apache.org
---
 .../hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java
index 2e7e78d14e2..cb2a20b29d5 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockReportLeaseManager.java
@@ -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 {}.",


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to