apollo_network_benchmark: add Sqmr variant to MessageSender with send logic#11551
Conversation
|
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
038ce65 to
a239b91
Compare
28715e4 to
f4b4c71
Compare
a239b91 to
d31e516
Compare
| } | ||
| Err(e) => { | ||
| error!("Failed to send SQMR query: {:?}", e); | ||
| } |
There was a problem hiding this comment.
SQMR silently continues after send failure, inflating metrics
Medium Severity
The Gossipsub branch calls unwrap() on send failure (panicking), while the new Sqmr branch only logs the error and returns normally. Since the caller in send_stress_test_messages unconditionally increments BROADCAST_MESSAGE_COUNT and BROADCAST_MESSAGE_BYTES_SUM after send_message returns, failed SQMR sends are counted as successful, producing misleading benchmark results.
| Ok(mut response_manager) => { | ||
| tokio::spawn(async move { | ||
| while let Some(_response) = response_manager.next().await {} | ||
| }); |
There was a problem hiding this comment.
Unbounded task spawning per SQMR send in stress loop
Medium Severity
Each SQMR send_message call spawns a detached tokio::spawn task to drain responses. Since the caller loops on a heartbeat interval in send_stress_test_messages, this creates an unbounded number of concurrent tasks over time. If responses arrive slower than the send rate, tasks accumulate indefinitely, leading to resource exhaustion — a real risk in a stress test scenario.
d31e516 to
6f4edea
Compare
f4b4c71 to
98a30f3
Compare
98a30f3 to
f24b8da
Compare
6f4edea to
15327ab
Compare



Note
Low Risk
Low risk: changes are limited to the benchmark stress-test node and only extend
MessageSenderto support SQMR query sending with basic error logging and response draining.Overview
Adds an
Sqmrvariant to the benchmark stress-test node’sMessageSenderand wiressend_messageto issue SQMR queries viaSqmrClientSender, spawning a task to drain responses and logging failures.No SQMR channel registration is implemented yet;
NetworkProtocol::Sqmrstill hits atodo!()inregister_protocol_channels.Written by Cursor Bugbot for commit 15327ab. This will update automatically on new commits. Configure here.