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

Rename and AddBlock may race and produce invalid edits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • None
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: