You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/10/17 23:09:33 UTC
[jira] [Created] (HDFS-7261) storageMap is accessed without
synchronization in DatanodeDescriptor#updateHeartbeatState()
Ted Yu created HDFS-7261:
----------------------------
Summary: storageMap is accessed without synchronization in DatanodeDescriptor#updateHeartbeatState()
Key: HDFS-7261
URL: https://issues.apache.org/jira/browse/HDFS-7261
Project: Hadoop HDFS
Issue Type: Bug
Reporter: Ted Yu
Priority: Minor
Here is the code:
{code}
failedStorageInfos = new HashSet<DatanodeStorageInfo>(
storageMap.values());
{code}
In other places, the lock on "DatanodeDescriptor.storageMap" is held:
{code}
synchronized (storageMap) {
final Collection<DatanodeStorageInfo> storages = storageMap.values();
return storages.toArray(new DatanodeStorageInfo[storages.size()]);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)