store: copy old value when refresh + cas

This commit is contained in:
Xiang Li 2016-06-15 15:32:58 -07:00
parent b607b36a6c
commit df56f9d6f9

View File

@ -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++