craigcondit commented on code in PR #455:
URL: https://github.com/apache/yunikorn-core/pull/455#discussion_r1034154141


##########
pkg/scheduler/objects/queue.go:
##########
@@ -1255,3 +1299,75 @@ func (sq *Queue) String() string {
        return fmt.Sprintf("{QueuePath: %s, State: %s, StateTime: %x, 
MaxResource: %s}",
                sq.QueuePath, sq.stateMachine.Current(), sq.stateTime, 
sq.maxResource)
 }
+
+// incRunningApps increments the number of running applications for this queue 
(recursively).
+// Guarded against going over the max set. Combined with the decRunningApps 
guard against below zero
+// this guard should allow self-heal.
+func (sq *Queue) incRunningApps(appID string) {
+       if sq == nil {
+               return
+       }
+       if sq.parent != nil {
+               sq.parent.incRunningApps(appID)
+       }
+       sq.Lock()
+       defer sq.Unlock()
+       delete(sq.allocatingAcceptedApps, appID)

Review Comment:
   We need to be sure that when an application goes to a terminal state that we 
also remove from sq.allocatingAcceptedApps, otherwise we potentially leak slots 
if some placeholders exist but we kill the app.



-- 
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]

Reply via email to