Skip to content

Commit

Permalink
etcdserver: handle proposal error when processing internal raft request
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch authored and gyuho committed Apr 9, 2018
1 parent 89c58b6 commit b049faa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion etcdserver/v3_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,12 @@ func (s *EtcdServer) processInternalRaftRequestOnce(ctx context.Context, r pb.In
defer cancel()

start := time.Now()
s.r.Propose(cctx, data)
err = s.r.Propose(cctx, data)
if err != nil {
proposalsFailed.Inc()
s.w.Trigger(id, nil) // Gc failed
return nil, err
}
proposalsPending.Inc()
defer proposalsPending.Dec()

Expand Down

0 comments on commit b049faa

Please sign in to comment.