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

Blocks and INodes could leak for Rename with overwrite flag

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0
    • namenode
    • None
    • Reviewed

    Description

      Following code in FSDirectory#unprotectedRenameTo doesn't collect blocks and INodes for non snapshot path.

              if (removedDst != null) {
                undoRemoveDst = false;
                if (removedNum > 0) {
                  BlocksMapUpdateInfo collectedBlocks = new BlocksMapUpdateInfo();
                  List<INode> removedINodes = new ChunkedArrayList<INode>();
                  filesDeleted = removedDst.cleanSubtree(Snapshot.CURRENT_STATE_ID,
                      dstIIP.getLatestSnapshotId(), collectedBlocks, removedINodes,
                      true).get(Quota.NAMESPACE);
                  getFSNamesystem().removePathAndBlocks(src, collectedBlocks,
                      removedINodes, false);
                }
              }
      

      Attachments

        1. HDFS-6870.001.patch
          4 kB
          Yi Liu

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hitliuyi Yi Liu
            hitliuyi Yi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment