Merge pull request #73357 from tedyu/master

Use read lock for scheduler_binder_cache GetDecisions
pull/564/head
Kubernetes Prow Robot 2019-01-29 01:21:24 -08:00 committed by GitHub
commit 2e90d92db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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 {