You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2015/08/21 01:09:45 UTC

[jira] [Commented] (HDFS-8930) Block report lease may leak if the 2nd full block report comes when NN is still in safemode

    [ https://issues.apache.org/jira/browse/HDFS-8930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14705942#comment-14705942 ] 

Jing Zhao commented on HDFS-8930:
---------------------------------

A simple fix can be removing the lease in this scenario:
{code}
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
@@ -1850,6 +1850,7 @@ public boolean processReport(final DatanodeID nodeID,
         blockLog.info("BLOCK* processReport: "
             + "discarded non-initial block report from {}"
             + " because namenode still in startup phase", nodeID);
+        blockReportLeaseManager.removeLease(node);
         return !node.hasStaleStorages();
       }
{code}

> Block report lease may leak if the 2nd full block report comes when NN is still in safemode
> -------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8930
>                 URL: https://issues.apache.org/jira/browse/HDFS-8930
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Jing Zhao
>            Priority: Minor
>
> This is a rare scenario in practice. If the NameNode is still in startup SafeMode while a DataNode sends it the 2nd FBR, the NameNode assigns the lease but rejects the report. The lease then leaves in NN until it expires.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)