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

Rename and AddBlock may race and produce invalid edits

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      While investigating HDFS-6618, we have discovered that rename happening in the middle of getAdditionalBlock() can lead to logging of invalid edit entry.

      In getAdditionalBlock() , the path is resolved once while holding the read lock and the same resolved path will be used in the edit log in the second half of the method holding the write lock. If a rename happens in between two locks, the path may no longer exist.

      When replaying the AddBlockOp, it will fail with FileNotFound.

        Attachments

        1. HDFS-6622.patch
          6 kB
          Kihwal Lee
        2. HDFS-6622.v2.patch
          5 kB
          Kihwal Lee

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: