mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #94083 from soulxu/shrink_lock_scope
Only lock statuses map when status isn't successful
This commit is contained in:
commit
9bba0390ed
@ -333,13 +333,13 @@ func (g *genericScheduler) findNodesThatPassFilters(ctx context.Context, prof *p
|
||||
feasibleNodes[length-1] = nodeInfo.Node()
|
||||
}
|
||||
} else {
|
||||
statusesLock.Lock()
|
||||
if !status.IsSuccess() {
|
||||
statusesLock.Lock()
|
||||
statuses[nodeInfo.Node().Name] = status
|
||||
}
|
||||
statusesLock.Unlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
beginCheckNode := time.Now()
|
||||
statusCode := framework.Success
|
||||
|
Loading…
Reference in New Issue
Block a user