mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #73357 from tedyu/master
Use read lock for scheduler_binder_cache GetDecisions
This commit is contained in:
		@@ -74,8 +74,8 @@ func NewPodBindingCache() PodBindingCache {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *podBindingCache) GetDecisions(pod *v1.Pod) nodeDecisions {
 | 
					func (c *podBindingCache) GetDecisions(pod *v1.Pod) nodeDecisions {
 | 
				
			||||||
	c.rwMutex.Lock()
 | 
						c.rwMutex.RLock()
 | 
				
			||||||
	defer c.rwMutex.Unlock()
 | 
						defer c.rwMutex.RUnlock()
 | 
				
			||||||
	podName := getPodName(pod)
 | 
						podName := getPodName(pod)
 | 
				
			||||||
	decisions, ok := c.bindingDecisions[podName]
 | 
						decisions, ok := c.bindingDecisions[podName]
 | 
				
			||||||
	if !ok {
 | 
						if !ok {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user