[
https://issues.apache.org/jira/browse/HDFS-12121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rushabh S Shah updated HDFS-12121:
----------------------------------
Description:
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.
was:
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.
> 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: [email protected]
For additional commands, e-mail: [email protected]