Files
kubernetes/pkg
Haosdent Huang ac3274521b scheduler: remove duplicate nominatedNodeName clearing in preemption
When preemption finds no candidates, it currently makes an explicit API
call to clear the pod's nominatedNodeName in findCandidates(). However,
this is redundant because:

1. When no candidates are found, Preempt() returns a PostFilterResult with
   an empty nominatedNodeName via NewPostFilterResultWithNominatedNode("")
2. This empty nominatedNodeName is propagated through the scheduling
   cycle to handleSchedulingFailure()
3. handleSchedulingFailure() then properly clears the nominatedNodeName
   through updatePod()

Remove the explicit ClearNominatedNodeName call in findCandidates() to
reduce unnecessary API calls while maintaining the same behavior.

This change improves performance by eliminating a duplicate API call
without changing the functional behavior of preemption.
2025-04-16 17:24:08 +08:00
..
2025-03-26 14:41:09 +00:00
2025-03-26 14:41:09 +00:00