chungen0126 commented on a change in pull request #384:
URL: https://github.com/apache/yunikorn-core/pull/384#discussion_r836071690
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -1264,6 +1264,9 @@ func (sa *Application) AddAllocation(info *Allocation) {
// Add the Allocation to the application
// No locking must be called while holding the lock
func (sa *Application) addAllocationInternal(info *Allocation) {
Review comment:
I tested the example:
```
func (sq *Queue) CanRun() bool {
sq.RLock()
defer sq.RUnlock()
if sq.maxRunningApps == 0 {
return true
}
return sq.runningApps < sq.maxRunningApps
}
```
However, if the maxApplications reached first, it will stop allocating
running applications anymore.
So, I add another condition to make sure it will still allocate running
allocate.
I check the status of the application first, and check the queue all the way
up to root.
In addition, I wrote some tests
--
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]