mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2495 from yichengq/337
rafthttp: report snapshot failure when dropping MsgSnap
This commit is contained in:
commit
6103a05ed1
@ -22,6 +22,7 @@ import (
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
|
||||
"github.com/coreos/etcd/etcdserver/stats"
|
||||
"github.com/coreos/etcd/pkg/types"
|
||||
"github.com/coreos/etcd/raft"
|
||||
"github.com/coreos/etcd/raft/raftpb"
|
||||
)
|
||||
|
||||
@ -159,6 +160,9 @@ func startPeer(tr http.RoundTripper, urls types.URLs, local, to, cid types.ID, r
|
||||
case writec <- m:
|
||||
default:
|
||||
p.r.ReportUnreachable(m.To)
|
||||
if isMsgSnap(m) {
|
||||
p.r.ReportSnapshot(m.To, raft.SnapshotFailure)
|
||||
}
|
||||
log.Printf("peer: dropping %s to %s since %s with %d-size buffer is blocked",
|
||||
m.Type, p.id, name, bufSizeMap[name])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user