zeekling commented on code in PR #7806:
URL: https://github.com/apache/hadoop/pull/7806#discussion_r2210629619


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractLeafQueue.java:
##########
@@ -1264,7 +1264,10 @@ public CSAssignment assignContainers(Resource 
clusterResource,
         userAssignable = canAssignToUser(clusterResource, 
application.getUser(),
             userLimit, application, candidates.getPartition(),
             currentResourceLimits);
-        if (!userAssignable && Resources.fitsIn(cul.reservation, appReserved)) 
{
+        if (!userAssignable
+            && Resources.fitsIn(cul.reservation, appReserved)
+            // Consider updating cul only if the application attempt is active.
+            && 
applicationAttemptMap.containsKey(application.getApplicationAttemptId())) {

Review Comment:
   applicationAttemptMap.containsKey(application.getApplicationAttemptId()) can 
be in the begin of  Iterator



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to