hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4842) Snapshot: identify the correct prior snapshot when deleting a snapshot under a renamed subtree
Date Thu, 23 May 2013 06:04:20 GMT

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

Arpit Agarwal commented on HDFS-4842:
-------------------------------------

Hi Jing,

Changes to INodeReference.java look fine.

In TestRenameWithSnapshot.java, the comment should be 'delete snapshot s1'.
{code}
    // delete snapshot s0
{code}

I think the comment should be 'copy of file in s2' and variable should be file_s2.
{code}
    // make sure the snapshot copy of file in s0 is destroyed
    final Path file_s1 = SnapshotTestHelper.getSnapshotPath(dir2, "s2",
{code}


Also it might be helpful to add the following check near the end of the test testRenameDirAndDeleteSnapshot_7.
{code}
    // make sure that file was merged into s0.
    final Path file_s0 = SnapshotTestHelper.getSnapshotPath(test, "s0", 
        "dir2/foo/bar/file");
    assertTrue(hdfs.exists(file_s0));
{code}

                
> Snapshot: identify the correct prior snapshot when deleting a snapshot under a renamed
subtree
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4842
>                 URL: https://issues.apache.org/jira/browse/HDFS-4842
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4842.000.patch, HDFS-4842.001.patch
>
>
> In our long-term running tests for snapshot we find the following bug:
> 1. initially we have directories /test, /test/dir1 and /test/dir2/foo. 
> 2. first take snapshot s0 and s1 on /test.
> 3. modify some descendant of foo (e.g., delete foo/bar/file), to make sure some changes
have been recorded to the snapshot diff associated with s1.
> 4. take snapshot s2 on /test/dir2
> 5. move foo from dir2 to dir1, i.e., rename /test/dir2/foo to /test/dir1/foo
> 6. delete snapshot s1
> After step 6, the snapshot copy of foo/bar/file should have been merged from s1 to s0
(i.e., s0 should be identified as the prior snapshot of s1). However, the current code failed
to identify the correct prior snapshot in the source tree of the rename operation and wrongly
used s2 as the prior snapshot.
> The bug only exists when nested snapshottable directories are enabled. To fix the bug,
we need to go upwards in the source tree of the rename operation (i.e., dir2) to identify
the correct prior snapshot in the above scenario. This jira will fix the bug and add several
corresponding unit tests. 

--
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