VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Snapshot (HDFS-2802)
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      For rename across snapshottable directories, suppose there are two snapshottable directories: /user1 and /user2 and we have the following steps:

      1. Take snapshot s1 on /user1 at time t1.
      2. Take snapshot s2 on /user2 at time t2.
      3. Take snapshot s3 on /user1 at time t3.
      4. Rename /user2/foo/ (an INodeDirectoryWithSnapshot instance) to /user1/foo/.

      After the rename we update the subtree of /user1/foo/ again (e.g., delete /user1/foo/bar), we need to decide where to record the diff. The problem is that the current implementation will identify s3 as the latest snapshot, thus recording the snapshot copy of bar to s3. However, the parent of bar, /user1/foo, is still in the created list of s3. Thus here we should record the snapshot copy of bar to s2.

      If we further take snapshot s4 on /user1, and make some further change under /user1/foo, these changes will be recorded in s4. Then if we delete the snapshot s4, similar with above, we should merge the change to s2, not s3.

      Thus in general, we may need to record the latest snapshots of both the src/dst subtree in the renamed inode and update the current INodeDirectory#getExistingINodeInPath accordingly.

        Attachments

        1. HDFS-4675.005.patch
          93 kB
          Jing Zhao
        2. HDFS-4675.004.patch
          89 kB
          Jing Zhao
        3. HDFS-4675.003.patch
          80 kB
          Jing Zhao
        4. HDFS-4675.002.patch
          74 kB
          Jing Zhao
        5. HDFS-4675.002.patch
          74 kB
          Jing Zhao
        6. HDFS-4675.001.patch
          65 kB
          Jing Zhao
        7. HDFS-4675.000.patch
          32 kB
          Jing Zhao

        Issue Links

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment