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