Merge pull request #73357 from tedyu/master

Use read lock for scheduler_binder_cache GetDecisions
This commit is contained in:
Kubernetes Prow Robot
2019-01-29 01:21:24 -08:00
committed by GitHub

View File

@@ -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 {