pbacsko commented on code in PR #945:
URL: https://github.com/apache/yunikorn-core/pull/945#discussion_r1716900742


##########
pkg/scheduler/objects/preemption.go:
##########
@@ -326,7 +326,7 @@ func (p *Preemptor) calculateVictimsByNode(nodeAvailable 
*resources.Resource, po
                                        // removing task does not violate queue 
constraints, adjust queue and node
                                        
nodeCurrentAvailable.AddTo(victim.GetAllocatedResource())
                                        // check if ask now fits and we haven't 
had this happen before
-                                       if 
nodeCurrentAvailable.FitInMaxUndef(p.ask.GetAllocatedResource()) && index < 0 {
+                                       if 
nodeCurrentAvailable.FitIn(p.ask.GetAllocatedResource()) && index < 0 {
                                                index = len(results)
                                        }

Review Comment:
   Can we add a test case for this? I'm worried that such small things can 
change and we have no corresponding test which tells us if there's something 
wrong.



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