You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Íñigo Goiri (Jira)" <ji...@apache.org> on 2022/02/01 17:39:00 UTC

[jira] [Commented] (YARN-10459) containerLaunchedOnNode method not need to hold schedulerApptemt lock

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

Íñigo Goiri commented on YARN-10459:
------------------------------------

Thanks [~jianliang.wu] for bringing this up and [~minni31] for driving the PR.
PR 3195 merged to trunk.

> containerLaunchedOnNode method not need to hold schedulerApptemt lock 
> ----------------------------------------------------------------------
>
>                 Key: YARN-10459
>                 URL: https://issues.apache.org/jira/browse/YARN-10459
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 3.2.0, 3.1.3
>            Reporter: Ryan Wu
>            Assignee: Minni Mittal
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: YARN-10459.v1.patch
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
>  
> Now, the containerLaunchedOnNode method hold the SchedulerApplicationAttempt writelock, but looking at the method, it does not change any field. And more seriously, this will affect the scheduler.
> {code:java}
>  public void containerLaunchedOnNode(ContainerId containerId, NodeId nodeId) { 
>     // Inform the container 
>     writelock.lock 
>     try { 
>       RMContainer rmContainer = getRMContainer(containerId); 
>       if (rmContainer == null) { 
>       // Some unknown container sneaked into the system. Kill it.          
>         rmContext.getDispatcher().getEventHandler().handle( new RMNodeCleanContainerEvent(nodeId, containerId)); return; 
>       } 
>       rmContainer.handle( new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED)); 
>    }finally { 
>       writeLock.unlock(); 
>    } 
> }  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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