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

Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 3.0.0-alpha1
    • Fix Version/s: 2.3.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I just saw the below piece of code in Fsnamesystem ctor.

       writeLock();
            try {
              this.cacheManager = new CacheManager(this, conf, blockManager);
            } finally {
              writeUnlock();
            }
      

      It seems unnecessary to keep writeLock here. I am not sure if there is a clear reason to keep the lock.

        Attachments

        1. HDFS-5665.patch
          1 kB
          Uma Maheswara Rao G

          Activity

            People

            • Assignee:
              umamaheswararao Uma Maheswara Rao G
              Reporter:
              umamaheswararao Uma Maheswara Rao G
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: