Commit 3591add
authored
chore: log message id if send queue full instead of full raw message
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 `RpcOut` using its `Debug` implementation, which included the complete `RawMessage` with potentially massive byte arrays (`data`, `signature`, `key` fields). In high-traffic scenarios, this resulted in extremely large log files and unnecessary disk I/O.
This PR introduces a `RpcLog` wrapper struct with a custom `Debug` implementation that:
- For `Publish` and `Forward` variants: logs only the essential debugging information (`message_id`, `topic`, `source`, `sequence_number`, `validated`) while omitting the large byte arrays (`data`, `signature`, `key`, and `timeout`)
- For other variants (`Subscribe`, `Unsubscribe`, `Graft`, `Prune`, `IHave`, `IWant`, `IDontWant`): logs normally as they don't contain large data
This change significantly reduces log file sizes in high-load scenarios while maintaining all useful debugging information for troubleshooting.
Pull-Request: #6263.1 parent 55e775a commit 3591add
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
150 | 164 | | |
151 | 165 | | |
152 | 166 | | |
| |||
0 commit comments