Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8930

Block report lease may leak if the 2nd full block report comes when NN is still in safemode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      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.

        Activity

        Hide
        jingzhao Jing Zhao added a comment -

        A simple fix can be removing the lease in this scenario:

        --- 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();
               }
        
        Show
        jingzhao Jing Zhao added a comment - A simple fix can be removing the lease in this scenario: --- 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(); }
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 21m 16s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 9m 4s There were no new javac warning messages.
        +1 javadoc 11m 41s There were no new javadoc warning messages.
        +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 1m 38s The applied patch generated 1 new checkstyle issues (total was 196, now 196).
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 2m 0s mvn install still works.
        +1 eclipse:eclipse 0m 41s The patch built with eclipse:eclipse.
        +1 findbugs 2m 45s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 3m 12s Pre-build of native portion
        -1 hdfs tests 69m 6s Tests failed in hadoop-hdfs.
            121m 56s  



        Reason Tests
        Timed out tests org.apache.hadoop.hdfs.TestBlockReaderLocal



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12751611/HDFS-8930.000.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 22de7c1
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/12076/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/12076/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12076/testReport/
        Java 1.7.0_55
        uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/12076/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 21m 16s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 9m 4s There were no new javac warning messages. +1 javadoc 11m 41s There were no new javadoc warning messages. +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 1m 38s The applied patch generated 1 new checkstyle issues (total was 196, now 196). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 2m 0s mvn install still works. +1 eclipse:eclipse 0m 41s The patch built with eclipse:eclipse. +1 findbugs 2m 45s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 12s Pre-build of native portion -1 hdfs tests 69m 6s Tests failed in hadoop-hdfs.     121m 56s   Reason Tests Timed out tests org.apache.hadoop.hdfs.TestBlockReaderLocal Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12751611/HDFS-8930.000.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 22de7c1 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/12076/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/12076/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12076/testReport/ Java 1.7.0_55 uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/12076/console This message was automatically generated.
        Hide
        cmccabe Colin P. McCabe added a comment -

        +1. Thanks, Jing Zhao.

        Show
        cmccabe Colin P. McCabe added a comment - +1. Thanks, Jing Zhao .
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8344 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8344/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8344 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8344/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #304 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/304/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #304 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/304/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #1033 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1033/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1033 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1033/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #300 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/300/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #300 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/300/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2230 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2230/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2230 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2230/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2249 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2249/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2249 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2249/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #292 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/292/)
        HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #292 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/292/ ) HDFS-8930 . Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao) (cmccabe: rev b5ce87f84d9de0a5347ab38c0567a5a70d1fbfd7) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportRateLimiting.java

          People

          • Assignee:
            jingzhao Jing Zhao
            Reporter:
            jingzhao Jing Zhao
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development