mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: add "RaftDropHeartbeat" failpoint
To simulate network partition locally. Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
9a7205cac8
commit
8990126c17
@ -510,6 +510,7 @@ func (cr *streamReader) decodeLoop(rc io.ReadCloser, t streamType) error {
|
||||
}
|
||||
cr.mu.Unlock()
|
||||
|
||||
// gofail: labelRaftDropHeartbeat:
|
||||
for {
|
||||
m, err := dec.decode()
|
||||
if err != nil {
|
||||
@ -519,6 +520,8 @@ func (cr *streamReader) decodeLoop(rc io.ReadCloser, t streamType) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// gofail-go: var raftDropHeartbeat struct{}
|
||||
// continue labelRaftDropHeartbeat
|
||||
receivedBytes.WithLabelValues(types.ID(m.From).String()).Add(float64(m.Size()))
|
||||
|
||||
cr.mu.Lock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user