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


##########
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:
   what happens when the application finishes when its past requests are in 
middle of iterator code block ?
   Isn't it much more safer to do here? I think we can have one check in the 
beginning as well to skip unwanted calls.
   
   Any thoughts ?



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to