hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharat Viswanadham (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9747) Reduce unnecessary UGI synchronization
Date Tue, 30 Jan 2018 18:35:00 GMT

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

Bharat Viswanadham commented on HADOOP-9747:
--------------------------------------------

Hi [~daryn]

Thanks for reply.

 
 # In getLoginUser(), there can be a still race condition, as setLoginUser() can be called
from loginUserFromSubject/loginUserFromKeytab, which might change *_loginUserRef._*

Can we update the getLoginUser() as below, this will only penalize during initial creation
of loginUserRef Object.
{code:java}
UserGroupInformation loginUser = logiUserRef;
if (loginUser == null) {
 synchronized(UserGroupInformation.class) {
 if (loginUser == null) {
 loginUser = createLoginUser(null);
 loginUserRef = loginUser;
 }
 }
}
return loginUser;{code}
 

 

   2. So, for this setLoginUser should be synchronized.

I think this might improvise the code, and also handle race condition. Could you please
let me know your thoughts?

> Reduce unnecessary UGI synchronization
> --------------------------------------
>
>                 Key: HADOOP-9747
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9747
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 0.23.0, 2.0.0-alpha, 3.0.0-alpha1
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Critical
>         Attachments: HADOOP-9747-trunk-03.patch, HADOOP-9747-trunk.01.patch, HADOOP-9747-trunk.02.patch,
HADOOP-9747.2.branch-2.patch, HADOOP-9747.2.trunk.patch, HADOOP-9747.branch-2.patch, HADOOP-9747.trunk.patch
>
>
> Jstacks of heavily loaded NNs show up to dozens of threads blocking in the UGI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message