Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7261

storageMap is accessed without synchronization in DatanodeDescriptor#updateHeartbeatState()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      Here is the code:

            failedStorageInfos = new HashSet<DatanodeStorageInfo>(
                storageMap.values());
      

      In other places, the lock on "DatanodeDescriptor.storageMap" is held:

          synchronized (storageMap) {
            final Collection<DatanodeStorageInfo> storages = storageMap.values();
            return storages.toArray(new DatanodeStorageInfo[storages.size()]);
          }
      

        Attachments

        1. HDFS-7261-002.patch
          3 kB
          Brahma Reddy Battula
        2. HDFS-7261-001.patch
          2 kB
          Brahma Reddy Battula
        3. HDFS-7261.patch
          0.9 kB
          Brahma Reddy Battula

          Activity

            People

            • Assignee:
              brahmareddy Brahma Reddy Battula
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: