hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushabh S Shah (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-12121) Audit logging of unsuccessful should not be done while holding fslock.
Date Tue, 11 Jul 2017 15:37:00 GMT
Rushabh S Shah created HDFS-12121:
-------------------------------------

             Summary: Audit logging of unsuccessful should not be done while holding fslock.
                 Key: HDFS-12121
                 URL: https://issues.apache.org/jira/browse/HDFS-12121
             Project: Hadoop HDFS
          Issue Type: Bug
    Affects Versions: 2.7.0
            Reporter: Rushabh S Shah
            Assignee: Rushabh S Shah


Currently we are audit logging the unsuccessful calls while holding fslock.
Following is just one example.
{code:title=FSNamesystem.java|borderStyle=solid}
HdfsFileStatus getFileInfo(final String src, boolean resolveLink)
    throws IOException {
    final String operationName = "getfileinfo";
    checkOperation(OperationCategory.READ);
    HdfsFileStatus stat = null;
    readLock();
    try {
      checkOperation(OperationCategory.READ);
      stat = FSDirStatAndListingOp.getFileInfo(dir, src, resolveLink);
    } catch (AccessControlException e) {
      logAuditEvent(false, operationName, src); //<---- audit logging while holding fs
read lock.
      throw e;
    } finally {
      readUnlock(operationName);
    }
    logAuditEvent(true, operationName, src);
    return stat;
  }
{code}

We should avoid doing this.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message