Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-2802 Support for RW/RO snapshots in HDFS
  3. HDFS-4636

Update quota usage when deleting files/dirs that were created after taking the latest snapshot

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Snapshot (HDFS-2802)
    • namenode
    • None
    • Reviewed

    Description

      This jira aims to fix two bugs in deleting files with snapshot:

      1. We should update the quota usage when the file/dir to be deleted is not included in the latest snapshot (i.e., the to-be-deleted file/dir is recorded in the created list of the latest snapshot). In particular, in FSDirectory#removeLastINode, instead of checking if the latest snapshot is null to decide whether we should update the quota usage, we should use INode#isInLatestSnapshot(Snapshot) as the check condition.

      2. Similarly, in FSDirectory#unprotectedDelete(...), we should update quota usage after calling INode#cleanSubtree, considering during cleanSubtree() we may delete files that were created after taking the latest snapshot.

      Attachments

        1. HDFS-4636.001.patch
          20 kB
          Jing Zhao

        Activity

          People

            jingzhao Jing Zhao
            jingzhao Jing Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: