-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
the send queue full warning logs the whole raw message data which result in massive log size
e.g.
{"timestamp":"2026-01-16T20:33:01.517","level":"WARN","message":"Send Queue full. Could not send Forward { message: RawMessage { source: Some( PeerId("16Uiu2HAmBFinmDjuVPs5ptgy3tTTyh5RcG9oRqjK2494Y5nsyVE4")), data: [3, 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 40, 1, 0, 0, 197, 126, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 46, 75, 250, 7, 109, 118, 184, 101, 52, 162, 23, 118, 174 , 212, 83, 172, 109, 18, 58, 116, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 20, 6, 250, 241, 114, 1 (edited)
Motivation
in high load traffic, high volume of warning messages like this result in extreme large log files, and also increase disk I/O load unncessary, while the rawMessage is not useful for debug, but msg id would be more useful
Current Implementation
current impl log the debug format
tracing::warn!(peer=%peer_id, "Send Queue full. Could not send {:?}.", rpc);/// A Gossipsub RPC message sent.
#[derive(Debug)]
pub enum RpcOut {
/// Publish a Gossipsub message on network.`timeout` limits the duration the message
/// can wait to be sent before it is abandoned.
Publish { message: RawMessage, timeout: Delay },
/// Forward a Gossipsub message on network. `timeout` limits the duration the message
/// can wait to be sent before it is abandoned.
Forward { message: RawMessage, timeout: Delay },
/// Subscribe a topic.
Subscribe(TopicHash),
/// Unsubscribe a topic.
Unsubscribe(TopicHash),
/// Send a GRAFT control message.
Graft(Graft),
/// Send a PRUNE control message.
Prune(Prune),
/// Send a IHave control message.
IHave(IHave),
/// Send a IWant control message.
IWant(IWant),
/// The node requests us to not forward message ids (peer_id + sequence _number) - IDontWant
/// control message.
IDontWant(IDontWant),
}
### Are you planning to do it yourself in a pull request?
Maybe