pbacsko commented on a change in pull request #384:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/384#discussion_r824539305
##########
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) {
+ if sa.queue != nil && sa.queue.maxRunningApps != 0 &&
sa.stateMachine.Is(Accepted.String()) && sa.queue.maxRunningApps <=
sa.queue.runningApps {
+ return
Review comment:
I don't think we can just return.
The application cannot continue its transition because maxRunningApps is
exceeded.
Therefore, it has to be saved to a slice along with the current timestamp so
that when `queue.runningApps < queue.maxRunningApps` we can manually trigger
the state transition.
The timestamp is needed because we want to trigger the app which has been
waiting for the longest amount of time.
--
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]