mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: support lease txn comparison
This commit is contained in:
parent
71e56a44b7
commit
ec4ca4408f
@ -473,6 +473,11 @@ func compareKV(c *pb.Compare, ckv mvccpb.KeyValue) bool {
|
||||
rev = tv.Version
|
||||
}
|
||||
result = compareInt64(ckv.Version, rev)
|
||||
case pb.Compare_LEASE:
|
||||
if tv, _ := c.TargetUnion.(*pb.Compare_Lease); tv != nil {
|
||||
rev = tv.Lease
|
||||
}
|
||||
result = compareInt64(ckv.Lease, rev)
|
||||
}
|
||||
switch c.Result {
|
||||
case pb.Compare_EQUAL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user