You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2014/06/17 06:59:01 UTC
[jira] [Updated] (HDFS-6551) Rename with OVERWRITE option may throw
NPE when the target file/directory is a reference INode
[ https://issues.apache.org/jira/browse/HDFS-6551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jing Zhao updated HDFS-6551:
----------------------------
Summary: Rename with OVERWRITE option may throw NPE when the target file/directory is a reference INode (was: Rename with OVERWRITE may throw NPE when the target file/directory is a reference INode)
> Rename with OVERWRITE option may throw NPE when the target file/directory is a reference INode
> ----------------------------------------------------------------------------------------------
>
> Key: HDFS-6551
> URL: https://issues.apache.org/jira/browse/HDFS-6551
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Jing Zhao
> Assignee: Jing Zhao
>
> The following steps can reproduce the NPE:
> 1. create a snapshot on /
> 2. move /foo/file1 to /bar/
> 3. rename /foo/file2 to /bar/file1 with the OVERWRITE option
> After step 2, /bar/file1 is a DstReference inode. In step 3, FSDirectory#unprotectedRename first detaches the DstReference inode from the WithCount inode, then it still calls the cleanSubtree method of the corresponding INodeFile instance, which triggers the NPE. We should follow the same logic in FSDirectory#unprotectedDelete which skips the cleanSubtree call in this scenario.
--
This message was sent by Atlassian JIRA
(v6.2#6252)