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

storageMap is accessed without synchronization in DatanodeDescriptor#updateHeartbeatState()

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None

    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment