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

Speed up lease/block recovery when DN fails and a block goes into recovery

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3-alpha
    • 2.1.0-beta
    • namenode
    • None
    • Reviewed


      This was observed while doing HBase WAL recovery. HBase uses append to write to its write ahead log. So initially the pipeline is setup as

      DN1 --> DN2 --> DN3

      This WAL needs to be read when DN1 fails since it houses the HBase regionserver for the WAL.

      HBase first recovers the lease on the WAL file. During recovery, we choose DN1 as the primary DN to do the recovery even though DN1 has failed and is not heartbeating any more.

      Avoiding the stale DN1 would speed up recovery and reduce hbase MTTR. There are two options.
      a) Ride on HDFS 3703 and if stale node detection is turned on, we do not choose stale datanodes (typically not heart beated for 20-30 seconds) as primary DN(s)
      b) We sort the replicas in order of last heart beat and always pick the ones which gave the most recent heart beat

      Going to the dead datanode increases lease + block recovery since the block goes into UNDER_RECOVERY state even though no one is recovering it actively. Please let me know if this makes sense. If yes, whether we should move forward with a) or b).



        1. 4721-v8.patch
          21 kB
          Varun Sharma
        2. 4721-v7.patch
          21 kB
          Varun Sharma
        3. 4721-v6.patch
          21 kB
          Varun Sharma
        4. 4721-v5.patch
          18 kB
          Varun Sharma
        5. 4721-v4.patch
          6 kB
          Varun Sharma
        6. 4721-v3.patch
          6 kB
          Varun Sharma
        7. 4721-v2.patch
          11 kB
          Varun Sharma
        8. 4721-trunk-v4.patch
          23 kB
          Varun Sharma
        9. 4721-trunk-v3.patch
          22 kB
          Varun Sharma
        10. 4721-trunk-v2.patch
          20 kB
          Varun Sharma
        11. 4721-trunk.patch
          20 kB
          Varun Sharma
        12. 4721-branch2.patch
          23 kB
          Varun Sharma

        Issue Links


          This comment will be Viewable by All Users Viewable by All Users


            varunsharma Varun Sharma
            varunsharma Varun Sharma
            0 Vote for this issue
            16 Start watching this issue




                Issue deployment