mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: invalidate cache on comparison range
This commit is contained in:
parent
fcf1abd23b
commit
aeb2dc03aa
@ -123,7 +123,7 @@ func (p *kvProxy) Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, e
|
||||
}
|
||||
// txn may claim an outdated key is updated; be safe and invalidate
|
||||
for _, cmp := range r.Compare {
|
||||
p.cache.Invalidate(cmp.Key, nil)
|
||||
p.cache.Invalidate(cmp.Key, cmp.RangeEnd)
|
||||
}
|
||||
// update any fetched keys
|
||||
if resp.Succeeded {
|
||||
|
Loading…
x
Reference in New Issue
Block a user