hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4883) complete() should verify fileId
Date Thu, 06 Jun 2013 19:29:20 GMT

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

Konstantin Shvachko commented on HDFS-4883:
-------------------------------------------

I see that addBlock() has a new parameter fileId while complete() doesn't have it.
In current implementation neither of the two need the parameter, because both use the path
to find the file INode. But addBlock() verifies that the fileId passed as the parameter is
the same as in the inode. While complete() uses GRANDFATHER_INODE_ID, which essentially means
don't check fileId.
I don't know what the plan is, but if it is to eventually use fileId as an identifier of the
file INode for open file, then it will make sense to use it in both addBlock() and complete().
And if we will want to change the implementation without changing wire APIs, we should probably
add fileId parameter to complete() now.
This will also enable verification that we are closing the correct file by checking the real
fileId in complete(), same as in addBlock().
Does it make sense?
                
> complete() should verify fileId
> -------------------------------
>
>                 Key: HDFS-4883
>                 URL: https://issues.apache.org/jira/browse/HDFS-4883
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.1.0-beta
>            Reporter: Konstantin Shvachko
>
> It seems inconsistent that complete() avoids verifying real fileId, while addBlock()
does it meticulously.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message