[
https://issues.apache.org/jira/browse/HDFS-11246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16091717#comment-16091717
]
Daryn Sharp commented on HDFS-11246:
------------------------------------
bq. audit log can be async; anyway logging out of locks is nice to have.
FYI, logging outside the lock is far more than nice to have. I added the async
edit logging but it's not enough.
The process of building the audit log line is not cheap and log4j still suffers
from synchronized contention before it drops the log messages into the async
appender's queue. Logging a spam of write ops that fail with ACE, while
holding the write lock, is a non-trivial drag on performance.
> FSNameSystem#logAuditEvent should be called outside the read or write locks
> during operations like getContentSummary
> --------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-11246
> URL: https://issues.apache.org/jira/browse/HDFS-11246
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.7.3
> Reporter: Kuhu Shukla
> Assignee: Kuhu Shukla
> Attachments: HDFS-11246.001.patch
>
>
> {code}
> 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);
> }
> {code}
> It would be nice to have audit logging outside the lock esp. in scenarios
> where applications hammer a given operation several times.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]