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

Benoy Antony commented on HADOOP-10590:
---------------------------------------

We had a an error where authorization policy checks returned inconsistent 
results on a  cluster.
Looking at the code , that inconsistency is possible due to the visibility 
issues of  the code. 

As you commented,  there is a cost  for volatile  vs non-volatile. The 
performance of volatile depends heavily on the CPU architecture . 
http://stackoverflow.com/questions/4633866/is-volatile-expensive .

I'll  try benchmarking the change, but not sure if that's very useful since 
performance of volatile varies wildly across CPU architectures. I believe, the 
main decision will be correctness vs performance.


> ServiceAuthorizationManager  is not threadsafe
> ----------------------------------------------
>
>                 Key: HADOOP-10590
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10590
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.4.0
>            Reporter: Benoy Antony
>            Assignee: Benoy Antony
>         Attachments: HADOOP-10590.patch
>
>
> The mutators in ServiceAuthorizationManager  are synchronized. The accessors 
> are not synchronized.
> This results in visibility issues when  ServiceAuthorizationManager's state 
> is accessed from different threads.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to