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

Blocks and INodes could leak for Rename with overwrite flag

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: