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

Synchronize invalidateBlocks in DatanodeDescriptor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: namenode
    • Labels:

      Description

      DatanodeDescriptor.java
      public void resetBlocks() {
        ...
        this.invalidateBlocks.clear();
        ...
      }
      
      public void clearBlockQueues() {
        synchronized (invalidateBlocks) {
          this.invalidateBlocks.clear();
        }
        ...
      }
      

      It may not be strictly necessary, but why risk it? The invalidateBlocks should be protected in resetBlocks() just like it is in clearBlockQueues()/

        Attachments

        1. HDFS-14798.001.patch
          0.9 kB
          Hemanth Boyina

          Activity

            People

            • Assignee:
              hemanthboyina Hemanth Boyina
              Reporter:
              belugabehr David Mollitor
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: