Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12657

Operations based on inode id must not fallback to the path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.0
    • None
    • namenode
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daryn Daryn Sharp
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: