grpcproxy: update cache based on txn response

Fixes more hangs in TestSTMConflict.
This commit is contained in:
Anthony Romano
2016-11-08 21:21:44 -08:00
parent dbb692e50f
commit a4dcceb8aa
2 changed files with 24 additions and 2 deletions

View File

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