Daryn Sharp created HDFS-12657:
----------------------------------

             Summary: Operations based on inode id must not fallback to the path
                 Key: HDFS-12657
                 URL: https://issues.apache.org/jira/browse/HDFS-12657
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: namenode
    Affects Versions: 2.5.0
            Reporter: Daryn Sharp


HDFS-6294 added the ability for some path-based operations to specify an 
optional inode id to mimic file descriptors.  If an inode id is provided and it 
exists, it replaces the provided path.  If it doesn't exist, it has the broken 
behavior of falling back to the supplied path.  A supplied inode id must be 
authoritative.  A FNF should be thrown if the inode does not exist.  
(HDFS-10745 changed from string paths to IIPs but preserved the same broken 
semantics)

This is broken since an operation specifying an inode for a deleted and 
recreated path will operate on the newer inode.  If another client recreates 
the path, the operation is likely to fail for other reasons such as lease 
checks.  However a multi-threaded client has a single lease id.  If thread1 
creates a file, it's somehow deleted, thread2 recreates the path, then further 
operations in thread1 may conflict with thread2 and corrupt the state of the 
file.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to