[
https://issues.apache.org/jira/browse/HDFS-15313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158140#comment-17158140
]
Stephen O'Donnell commented on HDFS-15313:
------------------------------------------
This Jira was originally created, because we encountered a cluster which had
data loss in the top level / live filesystem after removing a snapshot. At that
time, we assumed this was due to some underlying corruption in the image caused
by the bad fix in HDFS-13101. This Jira was therefore a fail safe to prevent
this from happening, but we believed it "would not happen" unless the fsimage
was corrupted in some way.
We have since discovered that even on a clean image, dataloss can occur if a
certain sequence of snapshot and filesystem operations are executed. This Jira
prevents the dataloss from occurring and therefore it is important to prevent
this. The sequence of steps which can result in dataloss are:
* Create a directory /dir1/dira
* Create a directory /dir1/dirx
* Make /dir1 snapshottable
* Create a snapshot s0
* Create a directory /dir1/dirx/dirb
* Create a snapshot s1
* Rename a directory /dir1/dirx/dirb to /dir1/dira/dirb
* Create a snapshot s2
* Create a file /dir1/dira/dirb/file1
* Create a snapshot s3
* Delete a snapshot s1
* Delete a snapshot s3
* File file1 gets deleted at this step causing a data loss
I have therefore cherry-picked this change 3.3.1 and 3.2, but there are
conflicts on 3.1 and I would assume 2.10.
[~shashikant] Would you be able to post a patch for branch-3.1 and branch-2.10
please?
> Ensure inodes in active filesytem are not deleted during snapshot delete
> ------------------------------------------------------------------------
>
> Key: HDFS-15313
> URL: https://issues.apache.org/jira/browse/HDFS-15313
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: snapshots
> Reporter: Shashikant Banerjee
> Assignee: Shashikant Banerjee
> Priority: Major
> Fix For: 3.2.2, 3.3.1, 3.4.0
>
> Attachments: HDFS-15313.000.patch, HDFS-15313.001.patch
>
>
> After HDFS-13101, it was observed in one of our customer deployments that
> delete snapshot ends up cleaning up inodes from active fs which can be
> referred from only one snapshot as the isLastReference() check for the parent
> dir introduced in HDFS-13101 may return true in certain cases. The aim of
> this Jira to add a check to ensure if the Inodes are being referred in the
> active fs , should not get deleted while deletion of snapshot happens.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]