hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4359) remove an unnecessary synchronized keyword in BPOfferService.java
Date Sat, 19 Jan 2013 14:06:14 GMT

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

Hudson commented on HDFS-4359:
------------------------------

Integrated in Hadoop-Mapreduce-trunk #1318 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1318/])
    HDFS-4359. Slow RPC responses from NN can prevent metrics collection on DNs. Contributed
by liang xie. (Revision 1435299)

     Result = SUCCESS
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1435299
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java

                
> remove an unnecessary synchronized keyword in BPOfferService.java
> -----------------------------------------------------------------
>
>                 Key: HDFS-4359
>                 URL: https://issues.apache.org/jira/browse/HDFS-4359
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 3.0.0, 2.0.2-alpha
>            Reporter: liang xie
>            Assignee: liang xie
>             Fix For: 2.0.3-alpha
>
>         Attachments: dn.jstack, HDFS-4359.txt, nn_dns_broken.jstack
>
>
> we encountered a NN&DN hung issue, the DN hung was caused by no NN response for heartbeat.
Per DN thread dump, i think we can have a little improvement on this detail code :
>   synchronized List<BPServiceActor> getBPServiceActors() {
>     return Lists.newArrayList(bpServices);
>   }
> the bpServices is declared as :
>   private List<BPServiceActor> bpServices =
>     new CopyOnWriteArrayList<BPServiceActor>();
> It's a thread-safe variant indead, so we can remove the above synchronized keyword safely,
IMHO.
> Here is a simple statistic for thread dump: 
> xieliang@xieliang:/tmp$ grep 0x00000007b00289f0 dn.jstack |wc -l
> 252

--
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