mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: handle raft Propose error in v2 applier
Handle "raft.ErrProposalDropped" as in v3 applier. Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
943962d419
commit
b38e138baf
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user