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

[branch-0.23] permission check and operation are done in a separate lock for getBlockLocations()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.8
    • 0.23.10
    • namenode
    • None
    • Reviewed

    Description

      For getBlockLocations() call, the read lock is acquired when doing permission check. But unlike other namenode methods, this is outside of the lock of the actual operation. So it ends up acquiring and releasing the lock twice. This has two implications.

      • permissions can change in between the locks
      • the lock fairness will penalize getBlockLocations().

      This was fixed in trunk and branch-2 as a part of HDFS-4679, but not in branch-0.23.

      Attachments

        1. HDFS-4972-branch-0.23.patch
          2 kB
          Kihwal Lee

        Activity

          People

            kihwal Kihwal Lee
            kihwal Kihwal Lee
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: