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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.8
    • Fix Version/s: 0.23.10
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: