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

Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0, 3.0.0-alpha1
    • 2.3.0
    • namenode
    • None
    • 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

            umamaheswararao Uma Maheswara Rao G
            umamaheswararao Uma Maheswara Rao G
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: