hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2117) DiskChecker#mkdirsWithExistsAndPermissionCheck may return true even when the dir is not created
Date Wed, 27 Jul 2011 22:37:10 GMT

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

Eli Collins commented on HDFS-2117:
-----------------------------------

I agree using exceptions would be better, for some reason exceptions were used in the trunk
version of HADOOP-6566 but not in the YDH patch which introduced this code. How about we fix
the current function (which should be returning false in this case) and file another jira
to bring the code in line with trunk?

> DiskChecker#mkdirsWithExistsAndPermissionCheck may return true even when the dir is not
created
> -----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-2117
>                 URL: https://issues.apache.org/jira/browse/HDFS-2117
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: data-node
>    Affects Versions: 0.20.203.1
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 0.20.205.0
>
>         Attachments: hdfs-2117-1.patch
>
>
> In branch-0.20-security as part of HADOOP-6566, DiskChecker#mkdirsWithExistsAndPermissionCheck
will return true even if it wasn't able to create the directory, which means instead of throwing
a DiskErrorException the code will proceed to getFileStatus and throw a FNF exception. Post
HADOOP-7040, which modified makeInstance to catch not just DiskErrorExceptions but IOExceptions
as well, this is not an issue since now the exception is caught either way. But for future
modifications we should still modify this method to return false if it was unable to create
the directory. This code is totally different in trunk, so not an issue there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message