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

Zhe Zhang commented on HDFS-10817:
----------------------------------

Thanks [~xkrogen] for the work! Patch looks pretty good. A few minor issues:
# Some lines are longer than 80 chars. Also I think multi-line comments should 
be:
{code}
/**
 * blah blah
 */
{code}
# Can we unify the logic for read and write locking? I.e. {{lastUnlock}} and 
{{needReport}}
# {{readLockHeldTimeStamp.remove();}} doesn't look necessary?
# It's a little flaky to only assert the log message contains the method name. 
Can we do more precise assertion here?
# Retrospectively, we should probably consolidate both write and read lock 
time-keeping in the {{FSNamesystemLock}} class itself. Doesn't make sense for 
both {{writeLock}} and {{writeLockInterruptibly}} to do the check and count 
time. We should file a follow-on JIRA for that.
# Another nice follow-on is to start a number of threads, some with sleep 
(longer than the threshold) and some don't. Then just verify the output has the 
ones with sleep.


> Add Logging for Long-held NN Read Locks
> ---------------------------------------
>
>                 Key: HDFS-10817
>                 URL: https://issues.apache.org/jira/browse/HDFS-10817
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: logging, namenode
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>         Attachments: HDFS-10817.000.patch, HDFS-10817.001.patch
>
>
> Right now the Namenode will log when a write lock is held for a long time to 
> help tracks methods which are causing expensive delays. Let's do the same for 
> read locks since these operations may also be expensive/long and cause 
> delays. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to