Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15382 Split one FsDatasetImpl lock to volume grain locks.
  3. HDFS-16787

Remove the redundant lock in DataSetLockManager#removeLock.

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      During patching the datanode fine-grained locking, found there is a redundant lock in DataSetLockManager#removeLock, and the code as bellow:

      @Override
      public void removeLock(LockLevel level, String... resources) {
        String lockName = generateLockName(level, resources);
        try (AutoCloseDataSetLock lock = writeLock(level, resources)) {
          // Here, this lock is redundant.
          lock.lock();
          lockMap.removeLock(lockName);
        }
      } 

      Attachments

        Issue Links

          Activity

            People

              xuzq_zander ZanderXu
              xuzq_zander ZanderXu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: