Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.8.0, 2.7.4, 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      HDFS-395 added the incremental BR feature. A concern was avoiding a race condition with ack-ing block invalidates followed by the directory scanner re-adding the block before the async delete service removes the block, possibly resulting in a full BR that includes the previously delete ack-ed block.

      The solution was to batch & delay block deletion acks via a hardcoded interval of 100 * heartbeat interval (default: 5min). The delay isn't required:

      1. The FSDatasetSpi tracks blocks pending deletions precisely so the scanner won't re-add the block to the volume map
      2. Block receiving, received, and deleted go into the same pending report. A block received event will trigger an immediate IBR which includes the deletion acks. Ie. The delay is meaningless for all but a quiescent cluster
      3. Failing to promptly report deleted blocks on a quiescent cluster prevents the NN from updating the block maps to remove the locations
      1. HDFS-7990.patch
        7 kB
        Daryn Sharp
      2. HDFS-7990-branch-2.7.01.patch
        7 kB
        Konstantin Shvachko

        Issue Links

          Activity

          Hide
          daryn Daryn Sharp added a comment -

          IBRs are always sent every heartbeat, even if it only contains delete acks. Note again that the existing behavior is: receiving = next heartbeat, received = immediate, delete = up to 5 mins later. Receiving/delete now have equivalent behavior.

          Balancer work in HDFS-7967 also discovered that SimulatedFSDataset does not send delete acks - unlike the real dataset - so I fixed that here.

          Show
          daryn Daryn Sharp added a comment - IBRs are always sent every heartbeat, even if it only contains delete acks. Note again that the existing behavior is: receiving = next heartbeat, received = immediate, delete = up to 5 mins later. Receiving/delete now have equivalent behavior. Balancer work in HDFS-7967 also discovered that SimulatedFSDataset does not send delete acks - unlike the real dataset - so I fixed that here.
          Hide
          hadoopqa Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12707526/HDFS-7990.patch
          against trunk revision 2228456.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 2 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10076//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10076//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12707526/HDFS-7990.patch against trunk revision 2228456. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 2 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10076//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10076//console This message is automatically generated.
          Hide
          kihwal Kihwal Lee added a comment -

          +1 The patch looks good.

          Show
          kihwal Kihwal Lee added a comment - +1 The patch looks good.
          Hide
          kihwal Kihwal Lee added a comment -

          I've committed this to trunk and branch-2.

          Show
          kihwal Kihwal Lee added a comment - I've committed this to trunk and branch-2.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #7446 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7446/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7446 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7446/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #146 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/146/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #146 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/146/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #880 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/880/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #880 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/880/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #137 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/137/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #137 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/137/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #146 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/146/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #146 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/146/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2096 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2096/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2096 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2096/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #2078 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2078/)
          HDFS-7990. IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2078 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2078/ ) HDFS-7990 . IBR delete ack should not be delayed. Contributed by Daryn Sharp. (kihwal: rev 60882ab26d49f05cbf0686944af6559f86b3417d) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBlockReports.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java
          Hide
          shv Konstantin Shvachko added a comment -

          Attaching final packport patch from HDFS-11838.

          Show
          shv Konstantin Shvachko added a comment - Attaching final packport patch from HDFS-11838 .

            People

            • Assignee:
              daryn Daryn Sharp
              Reporter:
              daryn Daryn Sharp
            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development