hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4596) Shutting down namenode during checkpointing can lead to md5sum error
Date Wed, 13 Mar 2013 22:40:13 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Wang updated HDFS-4596:
------------------------------

    Attachment: hdfs-4596-1.patch

Patch attached. I chose to switch the order on the write side, so that we first write the
MD5 file, then rename the fsimage.

I also added a test for this failure case, and verified the before/after behavior of the fix.

                
> Shutting down namenode during checkpointing can lead to md5sum error
> --------------------------------------------------------------------
>
>                 Key: HDFS-4596
>                 URL: https://issues.apache.org/jira/browse/HDFS-4596
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0, 2.0.4-alpha
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: hdfs-4596-1.patch
>
>
> This is a really rare error that can hit if a NN shutdown happens during the checkpointing
process.
> Checkpointing and restarting nominally looks like this:
> # FSImage is written to a tmp file and then renamed
> # MD5 file is written to a tmp file and then renamed
> # NN is killed and restarted
> # NN scans storage directories and picks up the renamed image file
> # NN validates that the image file matches its md5 file
> If the NN is killed before step 2 completes, this is what happens:
> # FSImage is written to a tmp file and then renamed
> # NN is killed and restarted (no MD5 file!)
> # NN scans storage directories and picks up the renamed image file
> # Since there's no matching MD5 file, NN errors out with a checksum error
> I think we can fix this by inverting the order of writing the image then md5, or inverting
the order of reading the image then md5.

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