hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9748) Reduce blocking on UGI.ensureInitialized
Date Fri, 20 Dec 2013 00:53:07 GMT

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

Todd Lipcon commented on HADOOP-9748:
-------------------------------------

It's probably really really hard to trigger, but I think this double-checked locking isn't
quite correct -- the initialize() function is free to make the conf member visible to other
threads before the object is fully initialized. I think to make it safe you need to do a write
to a volatile variable in initialize to ensure memory ordering. Thoughts?

> 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.4#6159)

Mime
View raw message