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

Blocks and INodes could leak for Rename with overwrite flag

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: