[
https://issues.apache.org/jira/browse/HDFS-988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eli Collins updated HDFS-988:
-----------------------------
Attachment: hdfs-988-4.patch
Updated patch attached.
* Added TestSafeMode#testOperationsWhileInSafeMode
* Removed duplicate copy of TestSafeMode#testManualSafeMode
* Modified FSNamesystem#getNamespaceInfo to take the lock for reading instead
of writing (don't see why the original patch took it for writing as it doesn't
mutate any state).
* TestEditLogRace#testSaveNamespace actually covers the scenario addressed by
this patch. I modified it to call setQuota instead of mkdirs/delete and w/o
this patch it asserts/NPEs, with this patch it loops w/o error. We could modify
testSaveNamespace to run with all the fs operations though I'm not sure the
additional coverage would be worth the additional execution time (perhaps it
could randomly select from a pre-canned set of test methods or fuzz the API).
Do people concur with my previous comment about computeDatanodeWork and
heartbeatCheck?
> saveNamespace can corrupt edits log, apparently due to race conditions
> ----------------------------------------------------------------------
>
> Key: HDFS-988
> URL: https://issues.apache.org/jira/browse/HDFS-988
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.20-append, 0.21.0, 0.22.0
> Reporter: dhruba borthakur
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.20-append, 0.22.0
>
> Attachments: HDFS-988_fix_synchs.patch, hdfs-988-2.patch,
> hdfs-988-3.patch, hdfs-988-4.patch, hdfs-988.txt, saveNamespace.txt,
> saveNamespace_20-append.patch
>
>
> The adminstrator puts the namenode is safemode and then issues the
> savenamespace command. This can corrupt the edits log. The problem is that
> when the NN enters safemode, there could still be pending logSycs occuring
> from other threads. Now, the saveNamespace command, when executed, would save
> a edits log with partial writes. I have seen this happen on 0.20.
> https://issues.apache.org/jira/browse/HDFS-909?focusedCommentId=12828853&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12828853
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira