Skip to content

Commit

Permalink
grpcproxy: invalidate cache on comparison range
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Jun 15, 2017
1 parent df88096 commit 6c40d98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/grpcproxy/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6c40d98

Please sign in to comment.