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 "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2011/07/26 22:44:09 UTC

[jira] [Created] (HDFS-2206) Add read-write lock to DatanodeManager

Add read-write lock to DatanodeManager
--------------------------------------

                 Key: HDFS-2206
                 URL: https://issues.apache.org/jira/browse/HDFS-2206
             Project: Hadoop HDFS
          Issue Type: Sub-task
            Reporter: Tsz Wo (Nicholas), SZE
            Assignee: Tsz Wo (Nicholas), SZE




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2206) Add read-write lock to DatanodeManager

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071354#comment-13071354 ] 

Todd Lipcon commented on HDFS-2206:
-----------------------------------

If we're adding more locks, can we take a step back and make sure it's well documented in the code what the lock heirarchy and granularity is?

I think this new refactoring work will help make it easier to understand this, but for operations which still cross the block-namespace chasm, it would be good to know which lock should be taken first, etc.

It would also be great if we could have a "debug mode" in which the locks assert their own heirarchy. For example, I've seen some systems assign an integer "level" to each lock, and use a threadlocal stack to keep track of the highest level lock taken. If you try to take a lower level lock while holding a higher level one, it will panic.

> Add read-write lock to DatanodeManager
> --------------------------------------
>
>                 Key: HDFS-2206
>                 URL: https://issues.apache.org/jira/browse/HDFS-2206
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira