pbacsko commented on a change in pull request #384:
URL: 
https://github.com/apache/incubator-yunikorn-core/pull/384#discussion_r824535715



##########
File path: pkg/scheduler/objects/application_state.go
##########
@@ -142,6 +143,9 @@ func NewAppState() *fsm.FSM {
                        },
                        fmt.Sprintf("enter_%s", Starting.String()): func(event 
*fsm.Event) {
                                app := event.Args[0].(*Application) 
//nolint:errcheck
+                               if app.queue != nil {
+                                       app.queue.runningApps++

Review comment:
       We have to update the counter in the parent as well, all the way up to 
root.
   
   So we need an `IncRunningApps()` method like:
   ```
   func (sq *Queue) IncRunningApps() {
        sq.Lock()
        defer sq.Unlock()
        sq.runningApps++
        if sq.parent != nil {
                sq.parent.IncRunningApps()              
        }
   }
   ```




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