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


##########
pkg/scheduler/objects/queue.go:
##########
@@ -1028,6 +1028,12 @@ func (sq *Queue) IncAllocatedResource(alloc 
*resources.Resource, nodeReported bo
 func (sq *Queue) allocatedResFits(alloc *resources.Resource) bool {
        sq.RLock()
        defer sq.RUnlock()
+       // on the root we want to reject a new allocation if it asks for 
resources not registered
+       // so do not use the "undefined" flag, also handles pruned max for root
+       if sq.isRoot() {
+               return sq.maxResource.FitIn(resources.AddOnlyExisting(alloc, 
sq.allocatedResource))
+       }
+       // any other queue undefined is always good

Review Comment:
   Root queue often needs special casing, as we have here. I'm fine with the 
code as-is.



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