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

Miklos Szegedi commented on YARN-6246:
--------------------------------------

Thank you for the patch [~kasha]. shouldAttemptPreemption() reads the root 
metrics. The root metrics is written holding the scheduler write lock, so I 
think we should read the metrics within readLock.lock();...unlock(); If we do 
not do this the we may work with an earlier memory but later CPU setting.
{code}
386         // Update starvation stats and identify starved applications
387         if (shouldAttemptPreemption()) {
388           readLock.lock();
{code}


> Identifying starved apps does not need the scheduler writelock
> --------------------------------------------------------------
>
>                 Key: YARN-6246
>                 URL: https://issues.apache.org/jira/browse/YARN-6246
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: fairscheduler
>    Affects Versions: 2.9.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>         Attachments: YARN-6246.001.patch, YARN-6246.002.patch
>
>
> Currently, the starvation checks are done holding the scheduler writelock. We 
> are probably better of doing this outside. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to