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

Snapshot: clean the blocks/files/directories under a renamed file/directory while deletion

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Currently DstReference#destroyAndCollectBlocks may fail to clean the subtree under the DstReference node for file/directory/snapshot deletion.

      Use case 1:

      1. rename under-construction file with 0-sized blocks after snapshot.
      2. delete the renamed directory.

      We need to make sure we delete the 0-sized block.

      Use case 2:

      1. create snapshot s0 for /
      2. create a new file under /foo/bar/
      3. rename foo --> foo2
      4. create snapshot s1
      5. delete bar and foo2
      6. delete snapshot s1

      We need to make sure we delete the file under /foo/bar since it is not included in snapshot s0.

        Attachments

        1. HDFS-5476.001.patch
          12 kB
          Jing Zhao

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: