You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Rushabh S Shah (JIRA)" <ji...@apache.org> on 2017/07/11 18:00:01 UTC
[jira] [Resolved] (HDFS-12121) Audit logging of unsuccessful
namesystem calls should not be done while holding fslock.
[ https://issues.apache.org/jira/browse/HDFS-12121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rushabh S Shah resolved HDFS-12121.
-----------------------------------
Resolution: Duplicate
Dup of HDFS-11246
> Audit logging of unsuccessful namesystem calls 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 namesystem 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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org