mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 23:29:21 +00:00
Merge pull request #117154 from p0lyn0mial/upstream-cacher-size-rlock
watchcache: currentCapacity acquires a read lock
This commit is contained in:
commit
6262d25371
@ -608,8 +608,8 @@ func (w *watchCache) Resync() error {
|
||||
}
|
||||
|
||||
func (w *watchCache) currentCapacity() int {
|
||||
w.Lock()
|
||||
defer w.Unlock()
|
||||
w.RLock()
|
||||
defer w.RUnlock()
|
||||
return w.capacity
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user