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

FSNameSystem#logAuditEvent should be called outside the read or write locks

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None

      Description

          readLock();
          boolean success = true;
          ContentSummary cs;
          try {
            checkOperation(OperationCategory.READ);
            cs = FSDirStatAndListingOp.getContentSummary(dir, src);
          } catch (AccessControlException ace) {
            success = false;
            logAuditEvent(success, operationName, src);
            throw ace;
          } finally {
            readUnlock(operationName);
          }
      

      It would be nice to have audit logging outside the lock esp. in scenarios where applications hammer a given operation several times.

        Attachments

        1. HDFS-11246.001.patch
          38 kB
          Kuhu Shukla
        2. HDFS-11246.002.patch
          38 kB
          Kuhu Shukla
        3. HDFS-11246.003.patch
          44 kB
          Kuhu Shukla
        4. HDFS-11246.004.patch
          52 kB
          Kuhu Shukla
        5. HDFS-11246.005.patch
          52 kB
          Kuhu Shukla
        6. HDFS-11246.006.patch
          56 kB
          Xiaoqiao He
        7. HDFS-11246.007.patch
          56 kB
          Xiaoqiao He
        8. HDFS-11246.008.patch
          56 kB
          Xiaoqiao He
        9. HDFS-11246.009.patch
          56 kB
          Xiaoqiao He
        10. HDFS-11246.010.patch
          67 kB
          Xiaoqiao He
        11. HDFS-11246.011.patch
          67 kB
          Xiaoqiao He

          Activity

            People

            • Assignee:
              hexiaoqiao Xiaoqiao He
              Reporter:
              kshukla Kuhu Shukla
            • Votes:
              0 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: