mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
store: copy old value when refresh + cas
This commit is contained in:
parent
b607b36a6c
commit
df56f9d6f9
@ -298,6 +298,10 @@ func (s *store) CompareAndSwap(nodePath string, prevValue string, prevIndex uint
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if expireOpts.Refresh {
|
||||||
|
value = n.Value
|
||||||
|
}
|
||||||
|
|
||||||
// update etcd index
|
// update etcd index
|
||||||
s.CurrentIndex++
|
s.CurrentIndex++
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user