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

DataNode unable to remove corrupt block replica due to race condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.6.0
    • None
    • datanode, namenode
    • None
    • CDH5.7.0

    Description

      Scenario:

      1. A client reads a replica blk_A_x from a data node and detected corruption.
      2. In the meantime, the replica is appended, updating its generation stamp from x to y.
      3. The client tells NN to mark the replica blk_A_x corrupt.
      4. NN tells the data node to (1) delete replica blk_A_x and (2) replicate the newer replica blk_A_y from another datanode. Due to block placement policy, blk_A_y is replicated to the same node. (It's a small cluster)
      5. DN is unable to receive the newer replica blk_A_y, because the replica already exists.
      6. DN is also unable to delete replica blk_A_y because blk_A_y does not exist.
      7. The replica on the DN is not part of data pipeline, so it becomes stale.

      If another replica becomes corrupt and NameNode wants to replicate a healthy replica to this DataNode, it can't, because a stale replica exists. Because this is a small cluster, soon enough (in a matter of a hour) no DataNode is able to receive a healthy replica.

      This cluster also suffers from HDFS-11019, so even though DataNode later detected data corruption, it was unable to report to NameNode.

      Note that we are still investigating the root cause of the corruption.

      The access pattern of client is through Httpfs, and it appended to finalized blocks and then finalize the block quickly. It's not long running pipeline.

      Attachments

        1. HDFS-11022.png
          51 kB
          Wei-Chiu Chuang

        Issue Links

          Activity

            People

              weichiu Wei-Chiu Chuang
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: