Merge pull request #135862 from grandeit/fix-race-scheduling-queue

Fix data race in PriorityQueue.UnschedulablePods()
This commit is contained in:
Kubernetes Prow Robot
2025-12-22 09:08:40 -08:00
committed by GitHub

View File

@@ -1302,6 +1302,8 @@ func (p *PriorityQueue) PodsInBackoffQ() []*v1.Pod {
// UnschedulablePods returns all the pods in unschedulable state.
func (p *PriorityQueue) UnschedulablePods() []*v1.Pod {
p.lock.RLock()
defer p.lock.RUnlock()
var result []*v1.Pod
for _, pInfo := range p.unschedulablePods.podInfoMap {
result = append(result, pInfo.Pod)