chore: log message id if send queue full instead of full raw message#6263
Open
IronJam11 wants to merge 1 commit intolibp2p:masterfrom
Open
chore: log message id if send queue full instead of full raw message#6263IronJam11 wants to merge 1 commit intolibp2p:masterfrom
IronJam11 wants to merge 1 commit intolibp2p:masterfrom
Conversation
chore: log message id if send queue is full instead of full raw message
014e74c to
d55a35e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #6252
Reduce log size for "Send Queue full" warnings by avoiding printing large message data.
Previously, when the send queue was full, the warning log would print the entire
RpcOutusing itsDebugimplementation, which included the completeRawMessagewith potentially massive byte arrays (data,signature,keyfields). In high-traffic scenarios, this resulted in extremely large log files and unnecessary disk I/O.This PR introduces a
RpcLogwrapper struct with a customDebugimplementation that:PublishandForwardvariants: logs only the essential debugging information (message_id,topic,source,sequence_number,validated) while omitting the large byte arrays (data,signature,key, andtimeout)Subscribe,Unsubscribe,Graft,Prune,IHave,IWant,IDontWant): logs normally as they don't contain large dataThis change significantly reduces log file sizes in high-load scenarios while maintaining all useful debugging information for troubleshooting.
Notes & open questions
The
timeoutfield (aDelaytype) is also omitted from the log output forPublishandForwardvariants. While this field could be useful for debugging, theDelaytype doesn't have a human-readable debug representation that shows the deadline, so including it wouldn't add much value to the logs.All existing tests pass with these changes.
Change checklist