Commit c8f18261 authored by Ted Yu's avatar Ted Yu Committed by Ted Yu

Use read lock for scheduler_binder_cache GetDecisions

parent 8d804ceb
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment