hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6551) Rename with OVERWRITE option may throw NPE when the target file/directory is a reference INode
Date Thu, 19 Jun 2014 14:24:26 GMT

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

Hudson commented on HDFS-6551:
------------------------------

SUCCESS: Integrated in Hadoop-Hdfs-trunk #1779 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1779/])
HDFS-6551. Rename with OVERWRITE option may throw NPE when the target file/directory is a
reference INode. Contributed by Jing Zhao. (jing9: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1603612)
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java


> 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
>          Components: namenode, snapshots
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>             Fix For: 2.5.0
>
>         Attachments: HDFS-6551.000.patch
>
>
> 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)

Mime
View raw message