You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2014/01/09 18:16:56 UTC

[jira] [Commented] (HADOOP-9748) Reduce blocking on UGI.ensureInitialized

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

Daryn Sharp commented on HADOOP-9748:
-------------------------------------

A volatile would probably be safest but I'm not sure there's harm in the race.  If the UGI isn't initialized, it does so with a default conf .  I avoided a volatile when I made the patch to avoid a memory barrier.  Barriers are pretty cheap on modern processors, and the barrier preventing instruction reordering is probably inapplicable in this case due to the subsequent sync forcing an ordering already.  Old habits die hard.

I'll look a little deeper and see if there's actually an issue.  The kerberos auth to local rule init might be but I thought I investigated that.

> Reduce blocking on UGI.ensureInitialized
> ----------------------------------------
>
>                 Key: HADOOP-9748
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9748
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: security
>    Affects Versions: 0.23.0, 2.0.0-alpha, 3.0.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Critical
>             Fix For: 3.0.0, 2.4.0, 0.23.10
>
>         Attachments: HADOOP-9748.branch-23.patch, HADOOP-9748.branch-23.patch, HADOOP-9748.patch, HADOOP-9748.patch
>
>
> EnsureInitialized is always sync'ed on the class, when it should only sync if it actually has to initialize.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)