Merge pull request #117154 from p0lyn0mial/upstream-cacher-size-rlock

watchcache: currentCapacity acquires a read lock
This commit is contained in:
Kubernetes Prow Robot 2023-04-11 21:17:12 -07:00 committed by GitHub
commit 6262d25371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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