distinguish throttled validation because of a full worker queue.
This commit is contained in:
parent
06d72b93da
commit
98671566a2
6
score.go
6
score.go
|
@ -607,6 +607,12 @@ func (ps *peerScore) RejectMessage(msg *Message, reason string) {
|
|||
fallthrough
|
||||
case "blacklisted source":
|
||||
return
|
||||
|
||||
case "validation queue full":
|
||||
// the message was rejected before it entered the validation pipeline;
|
||||
// we don't know if this message has a valid signature, and thus we also don't know if
|
||||
// it has a valid message ID; all we can do is ignore it.
|
||||
return
|
||||
}
|
||||
|
||||
drec := ps.deliveries.getRecord(ps.msgID(msg.Message))
|
||||
|
|
|
@ -151,8 +151,8 @@ func (v *validation) Push(src peer.ID, msg *Message) bool {
|
|||
select {
|
||||
case v.validateQ <- &validateReq{vals, src, msg}:
|
||||
default:
|
||||
log.Warningf("message validation throttled; dropping message from %s", src)
|
||||
v.tracer.RejectMessage(msg, "validation throttled")
|
||||
log.Warningf("message validation throttled: queue full; dropping message from %s", src)
|
||||
v.tracer.RejectMessage(msg, "validation queue full")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue