store: use nextIndex where necessary

release-2.0
Jonathan Boulle 2014-09-24 14:07:52 -07:00
parent ec1df42d04
commit b15fefa8ea
1 changed files with 2 additions and 2 deletions

View File

@ -275,7 +275,7 @@ func (s *store) Delete(nodePath string, dir, recursive bool) (*Event, error) {
nextIndex := s.CurrentIndex + 1
e := newEvent(Delete, nodePath, nextIndex, n.CreatedIndex)
e.EtcdIndex = s.CurrentIndex
e.EtcdIndex = nextIndex
e.PrevNode = n.Repr(false, false)
eNode := e.Node
@ -414,7 +414,7 @@ func (s *store) Update(nodePath string, newValue string, expireTime time.Time) (
}
e := newEvent(Update, nodePath, nextIndex, n.CreatedIndex)
e.EtcdIndex = s.CurrentIndex
e.EtcdIndex = nextIndex
e.PrevNode = n.Repr(false, false)
eNode := e.Node