hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6870) Blocks and INodes could leak for Rename with overwrite flag
Date Wed, 20 Aug 2014 08:20:26 GMT

    [ https://issues.apache.org/jira/browse/HDFS-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103599#comment-14103599
] 

Vinayakumar B commented on HDFS-6870:
-------------------------------------

patch looks good. +1

> Blocks and INodes could leak for Rename with overwrite flag
> -----------------------------------------------------------
>
>                 Key: HDFS-6870
>                 URL: https://issues.apache.org/jira/browse/HDFS-6870
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-6870.001.patch
>
>
> Following code in FSDirectory#unprotectedRenameTo doesn't collect blocks and INodes for
non snapshot path.
> {code}
>         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);
>           }
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message