hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kuhu Shukla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11246) FSNameSystem#logAuditEvent should be called outside the read or write locks during operations like getContentSummary
Date Thu, 15 Dec 2016 14:38:58 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751533#comment-15751533
] 

Kuhu Shukla commented on HDFS-11246:
------------------------------------

Thanks a lot [~linyiqun]. 
bq.  I see we can move logAuditEvent(success, operationName, src) into finally block 
That would mean we log for IOExceptions and others as well with allowed=false, which should
ideally only be when we see an AccessControlException. This was a bug fixed thru HDFS-9395.
We can still have the call in the finally block while making sure we don't log unconditionally.

> 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
>
> {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.3.4#6332)

---------------------------------------------------------------------
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