mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: update cache based on txn response
Fixes more hangs in TestSTMConflict.
This commit is contained in:
4
proxy/grpcproxy/cache/store.go
vendored
4
proxy/grpcproxy/cache/store.go
vendored
@@ -134,14 +134,14 @@ func (c *cache) Invalidate(key, endkey []byte) {
|
||||
}
|
||||
|
||||
ivs = c.cachedRanges.Stab(ivl)
|
||||
c.cachedRanges.Delete(ivl)
|
||||
|
||||
for _, iv := range ivs {
|
||||
keys := iv.Val.([]string)
|
||||
for _, key := range keys {
|
||||
c.lru.Remove(key)
|
||||
}
|
||||
}
|
||||
// delete after removing all keys since it is destructive to 'ivs'
|
||||
c.cachedRanges.Delete(ivl)
|
||||
}
|
||||
|
||||
// Compact invalidate all caching response before the given rev.
|
||||
|
||||
Reference in New Issue
Block a user