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

Brandon Li commented on HDFS-4883:
----------------------------------

Hi Konstantin, it makes sense to use fileId in complete(). 

Adding fileId can do things right in two cases: 1. after renaming an opened 
file, the client should still be able to close the file.
2. after renaming an opened file, the client should not close the wrong file 
(it could if using only path in complete()).

Here is an example of case2. 
1. Client opens file A and B.
2. Delete B, rename A to B.
3. Close B. Without fileId in complete(), original file A is closed.

                
> 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

Reply via email to