mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: lock store when getting size
Fixes data race in proxy integration tests.
This commit is contained in:
parent
40f0193c4c
commit
62398954e4
2
proxy/grpcproxy/cache/store.go
vendored
2
proxy/grpcproxy/cache/store.go
vendored
@ -157,5 +157,7 @@ func (c *cache) Compact(revision int64) {
|
||||
}
|
||||
|
||||
func (c *cache) Size() int {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
return c.lru.Len()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user