mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
Merge pull request #135862 from grandeit/fix-race-scheduling-queue
Fix data race in PriorityQueue.UnschedulablePods()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user