pbacsko commented on code in PR #597:
URL: https://github.com/apache/yunikorn-core/pull/597#discussion_r1276297128
##########
pkg/scheduler/objects/application.go:
##########
@@ -103,6 +104,7 @@ type Application struct {
stateLog []*StateLogEntry // state log for this
application
placeholderData map[string]*PlaceholderData // track placeholder
and gang related info
askMaxPriority int32 // highest priority
value of outstanding asks
+ hasPlaceholderAlloc atomic.Bool // Whether there is at
least one allocated placeholder (has to be atomic.Bool due to queue/app lock
ordering)
Review Comment:
This is only possible if we call `GetCopyOfApps()` then go through it and
filter out the ones without a PH allocation. I wanted to avoid this because we
copy the apps unnecessarily. Otherwise, we have a locked mutex order queue->
application and the inverse application->queue can happen in a separate
goroutine (eg. `AddAllocationAsk()`, `removeAsksInternal()`) at the same 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]