[
https://issues.apache.org/jira/browse/HDFS-5242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daryn Sharp updated HDFS-5242:
------------------------------
Attachment: HDFS-5242.patch
Remove synchronized keyword from {{get/setNetworkLocation}}. HDFS-1985 added
the synch with no clear reason and it's the only synch'ed mutable field in the
class. A profiler identified this unnecessary synch after peeling away other
issues. Unnecessary synchs cause thread contention and which harms performance
due to context switches.
The synch doesn't really protect against any race conditions. Further, the
network location is only set when registering a datanode so it's not changing
during normal operation.
> 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 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