You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2013/07/03 18:10:24 UTC

[jira] [Commented] (HDFS-4777) File creation with overwrite flag set to true results in logSync holding namesystem lock

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

Colin Patrick McCabe commented on HDFS-4777:
--------------------------------------------

I might be missing something here, but I don't see why "Holding the lock when calling FSNS#logSyncAll when entering safe mode" is necessary.  Can't we just move the logSync to after safeMode has been set?

Conceptually, I don't see why setting safe mode should require logSync to succeed first.  Surely we don't want setting safe mode to fail because logSync failed?  So we can just do it at the end of enterSafeMode, after releasing the write lock.
                
> File creation with overwrite flag set to true results in logSync holding namesystem lock
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-4777
>                 URL: https://issues.apache.org/jira/browse/HDFS-4777
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 0.23.0, 2.0.0-alpha
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>         Attachments: HDFS-4777.patch
>
>
> FSNamesystem#startFileInternal calls delete. Delete method releases the write lock, making parts of startFileInternal code unintentionally executed without write lock being held.

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