hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinay (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5427) not able to read deleted files from snapshot directly under snapshottable dir after checkpoint and NN restart
Date Tue, 05 Nov 2013 02:00:18 GMT

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

Vinay commented on HDFS-5427:
-----------------------------

Thanks Jing for the review.
Uploaded the patch with comments addressed.
bq. We may want to add more javadoc to the new unit test besides the jira number. Also, we
can use HdfsConstants.DOT_SNAPSHOT_DIR instead of ".snapshot".
Javadocs added. Instead of using ".snapshot" used as below
{code:java} String snapshotPath = Snapshot.getSnapshotPath(foo.toString(), "s1/bar");{code}

bq. In the current fix, the following code may also be hit by a rename operation, since if
we rename a file under a snapshot, a reference node will be created and added into the deleted
list of its original parent:

Yes, rename operation also will add a deleted child in diffs. But it will not result in current
issue unless the file is deleted from original place i.e. outside snapshots. since original
file updates the blocksmap, issue will not occur. So added a test with deletion of renamed
file included.


Please review the updated patch. 

> not able to read deleted files from snapshot directly under snapshottable dir after checkpoint
and NN restart
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5427
>                 URL: https://issues.apache.org/jira/browse/HDFS-5427
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Vinay
>            Assignee: Vinay
>            Priority: Blocker
>         Attachments: HDFS-5427-v2.patch, HDFS-5427.patch, HDFS-5427.patch
>
>
> 1. allow snapshots under dir /foo
> 2. create a file /foo/bar
> 3. create a snapshot s1 under /foo
> 4. delete the file /foo/bar
> 5. wait till checkpoint or do saveNameSpace
> 6. restart NN.
> 7. Now try to read the file from snapshot /foo/.snapshot/s1/bar
> client will get BlockMissingException
> Reason is 
> While loading the deleted file list for a snashottable dir from fsimage, blocks were
not updated in blocksmap



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message