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

Suresh Srinivas commented on HDFS-5242:
---------------------------------------

I am not sure how much performance impact this synchronization has. Do you have 
have numbers about the impact of this change?

bq. As mentioned in the first comment, the set is called only once at DN 
registration so there is actually no race to avoid.
@Daryn, I think if a setter is called by one thread and getter is called by 
another, then synchronized is still needed. Without that it is possible that 
another thread may never see the changed value.


> Reduce contention on DatanodeInfo instances
> -------------------------------------------
>
>                 Key: HDFS-5242
>                 URL: https://issues.apache.org/jira/browse/HDFS-5242
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 2.0.0-alpha, 3.0.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>         Attachments: HDFS-5242.patch
>
>
> Synchronization in {{DatanodeInfo}} instances causes unnecessary contention 
> between call handlers.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to