Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-5665

Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.2.0
    • 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.

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

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development