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

Flaws in block report processing can cause data loss

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.9, 2.2.0
    • Fix Version/s: 0.23.10, 2.3.0
    • Component/s: namenode
    • Labels:
      None

      Description

      The incremental block reports from data nodes and block commits are asynchronous. This becomes troublesome when the gen stamp for a block is changed during a write pipeline recovery.

      • If an incremental block report is delayed from a node but NN had enough replicas already, a report with the old gen stamp may be received after block completion. This replica will be correctly marked corrupt. But if the node had participated in the pipeline recovery, a new (delayed) report with the correct gen stamp will come soon. However, this report won't have any effect on the corrupt state of the replica.
      • If block reports are received while the block is still under construction (i.e. client's call to make block committed has not been received by NN), they are blindly accepted regardless of the gen stamp. If a failed node reports in with the old gen stamp while pipeline recovery is on-going, it will be accepted and counted as valid during commit of the block.

      Due to the above two problems, correct replicas can be marked corrupt and corrupt replicas can be accepted during commit. So far we have observed two cases in production.

      • The client hangs forever to close a file. All replicas are marked corrupt.
      • After the successful close of a file, read fails. Corrupt replicas are accepted during commit and valid replicas are marked corrupt afterward.

        Attachments

        1. HDFS-5438.trunk.patch
          17 kB
          Kihwal Lee
        2. HDFS-5438-1.trunk.patch
          17 kB
          Kihwal Lee
        3. HDFS-5438-2.trunk.patch
          17 kB
          Kihwal Lee
        4. HDFS-5438-3.trunk.patch
          16 kB
          Kihwal Lee
        5. HDFS-5438-4.branch-0.23.patch
          21 kB
          Kihwal Lee
        6. HDFS-5438-4.trunk.patch
          21 kB
          Kihwal Lee

          Activity

            People

            • Assignee:
              kihwal Kihwal Lee
              Reporter:
              kihwal Kihwal Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: