zhuqi-lucas commented on PR #759:
URL: https://github.com/apache/yunikorn-core/pull/759#issuecomment-1859047342

   Good catch @yangwwei , i think it's because we allow preemption when request 
don't fit the headroom, so we should allow the reservation when it don't fit 
the headroom, thanks. Need @craigcondit @wilfred-s for double check.
   ```
   // resource must fit in headroom otherwise skip the request (unless 
preemption could help)
                if !headRoom.FitInMaxUndef(request.GetAllocatedResource()) {
                        // attempt preemption
                        if allowPreemption && *preemptAttemptsRemaining > 0 {
                                *preemptAttemptsRemaining--
                                fullIterator := fullNodeIterator()
                                if fullIterator != nil {
                                        if alloc, ok := 
sa.tryPreemption(headRoom, preemptionDelay, request, fullIterator, false); ok {
                                                // preemption occurred, and 
possibly reservation
                                                return alloc
                                        }
                                }
                        }
                        sa.appEvents.sendAppDoesNotFitEvent(request, headRoom)
                        continue
                }
   ```


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