mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2666 from philips/check-error-in-store
store: always check the error
This commit is contained in:
commit
90a7978474
@ -354,8 +354,10 @@ func (s *store) CompareAndDelete(nodePath string, prevValue string, prevIndex ui
|
||||
s.WatcherHub.notifyWatchers(e, path, true)
|
||||
}
|
||||
|
||||
// delete a key-value pair, no error should happen
|
||||
n.Remove(false, false, callback)
|
||||
err = n.Remove(false, false, callback)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s.WatcherHub.notify(e)
|
||||
s.Stats.Inc(CompareAndDeleteSuccess)
|
||||
|
Loading…
x
Reference in New Issue
Block a user