hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4777) File creation with overwrite flag set to true results in logSync holding namesystem lock
Date Wed, 03 Jul 2013 16:10:24 GMT

    [ 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

Mime
View raw message