Skip to content

Commit

Permalink
Merge pull request #9558 from gyuho/propose
Browse files Browse the repository at this point in the history
etcdserver: handle raft Propose error in v2 applier
  • Loading branch information
gyuho authored Apr 10, 2018
2 parents 943962d + b38e138 commit e9aa8fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion etcdserver/v2_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ func (a *reqV2HandlerEtcdServer) processRaftRequest(ctx context.Context, r *Requ
ch := a.s.w.Register(r.ID)

start := time.Now()
a.s.r.Propose(ctx, data)
err = a.s.r.Propose(ctx, data)
if err != nil {
proposalsFailed.Inc()
a.s.w.Trigger(r.ID, nil)
return Response{}, err
}
proposalsPending.Inc()
defer proposalsPending.Dec()

Expand Down

0 comments on commit e9aa8fb

Please sign in to comment.