Skip to content

Commit 49135d6

Browse files
committed
fix: take QHint disable scenario into consideration
1 parent 4b92f6d commit 49135d6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pkg/scheduler/backend/queue/scheduling_queue.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,10 @@ func (p *PriorityQueue) isPodWorthRequeuing(logger klog.Logger, pInfo *framework
417417
// that indicates that the event wants to be effective for the Pod only.
418418
// Specifically, EventForceActivate could have a target Pod in newObj.
419419
if newObj != nil {
420-
if pod, ok := newObj.(*v1.Pod); ok && pod.UID == pInfo.Pod.UID {
421-
logger.V(6).Info("Worth requeuing because the event is wildcard", "pod", klog.KObj(pInfo.Pod))
422-
return queueAfterBackoff
420+
if pod, ok := newObj.(*v1.Pod); !ok || pod.UID != pInfo.Pod.UID {
421+
// This wildcard event is not for this Pod.
422+
return queueSkip
423423
}
424-
// This wildcard event is not for this Pod.
425-
return queueSkip
426424
}
427425

428426
// If the wildcard event is special one as someone wants to force all Pods to move to activeQ/backoffQ.
@@ -620,10 +618,11 @@ func (p *PriorityQueue) Activate(logger klog.Logger, pods map[string]*v1.Pod) {
620618
continue
621619
}
622620

623-
// If this pod is in-flight, register the activation event so that the pod will be requeued when it comes back.
621+
// If this pod is in-flight, register the activation event or update moveRequestCycle so that the pod will be requeued when it comes back.
624622
// Specifically in the in-tree plugins, this is for the scenario with the preemption plugin
625623
// where the async preemption API calls are all done or fail at some point before the Pod comes back to the queue.
626624
p.activeQ.addEventsIfPodInFlight(nil, pod, []framework.ClusterEvent{framework.EventForceActivate})
625+
p.moveRequestCycle = p.activeQ.schedulingCycle()
627626
}
628627

629628
if activated {

0 commit comments

Comments
 (0)