MENG DING commented on YARN-4519:

Hi, [~sandflee]

The delta resource is the difference between currently allocated resource and 
the target resource (or in the case of rollback, the difference between 
currently allocated resource and the last confirmed resource). For decrease 
request, for example, we need to put a CS lock around computing delta resource 
and CS.decreaseContainer, otherwise the currently allocated resource might have 
been changed in the middle by the scheduling thread causing the delta resource 
to be outdated.

decreaseContainer updates core scheduler statistics, it must be locked.

> potential deadlock of CapacityScheduler between decrease container and assign 
> containers
> ----------------------------------------------------------------------------------------
>                 Key: YARN-4519
>                 URL: https://issues.apache.org/jira/browse/YARN-4519
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacityscheduler
>            Reporter: sandflee
>            Assignee: MENG DING
> In CapacityScheduler.allocate() , first get FiCaSchedulerApp sync lock, and 
> may be get CapacityScheduler's sync lock in decreaseContainer()
> In scheduler thread,  first get CapacityScheduler's sync lock in 
> allocateContainersToNode(), and may get FiCaSchedulerApp sync lock in 
> FicaSchedulerApp.assignContainers(). 

This message was sent by Atlassian JIRA

Reply via email to