mirror of https://github.com/k3s-io/k3s
Merge pull request #73357 from tedyu/master
Use read lock for scheduler_binder_cache GetDecisionspull/564/head
commit
2e90d92db9
|
@ -74,8 +74,8 @@ func NewPodBindingCache() PodBindingCache {
|
|||
}
|
||||
|
||||
func (c *podBindingCache) GetDecisions(pod *v1.Pod) nodeDecisions {
|
||||
c.rwMutex.Lock()
|
||||
defer c.rwMutex.Unlock()
|
||||
c.rwMutex.RLock()
|
||||
defer c.rwMutex.RUnlock()
|
||||
podName := getPodName(pod)
|
||||
decisions, ok := c.bindingDecisions[podName]
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in New Issue