[
https://issues.apache.org/jira/browse/HDFS-10682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403093#comment-15403093
]
Chen Liang commented on HDFS-10682:
-----------------------------------
Thank you [~arpitagarwal] very much for the review! A few things I would like
to clarify though:
1. by "fix the other locations", did you mean fixing places like such?:
synchronized(dataset) {
...
}
As dataset itself has been refactored with a separate lock, having this
synchronized cal meanswe would have two locks here. I have been thinking about
situations like this. And I think we need dataset to expose lock acquire and
release to those callers. What do you think?
2. Regarding the ThreadLocal variables, you have a good point. But I was trying
to take into account lock acquire time and lock release time there, which
requires recording time before acquiring lock and after releasing lock and this
is ThreadLocal is all about. Do you have any comments on this? e.g. are these
values worth recording?
3. And you are totally right that I don't need the equals zero checks, thanks
for pointing it out!
> Replace FsDatasetImpl object lock with a separate lock object
> -------------------------------------------------------------
>
> Key: HDFS-10682
> URL: https://issues.apache.org/jira/browse/HDFS-10682
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: datanode
> Reporter: Chen Liang
> Assignee: Chen Liang
> Attachments: HDFS-10682.001.patch, HDFS-10682.002.patch,
> HDFS-10682.003.patch, HDFS-10682.004.patch, HDFS-10682.005.patch,
> HDFS-10682.006.patch
>
>
> Add a metric to measure the time the lock of FSDataSetImpl is held by a
> thread. The goal is to expose this for users to identify operations that
> locks dataset for long time ("long" in some sense) and be able to
> understand/reason/track the operation based on logs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]