hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2206) Add read-write lock to DatanodeManager
Date Tue, 26 Jul 2011 20:52:10 GMT

    [ 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


View raw message