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
f24b8da to
2c00b15
Compare
15327ab to
5198ebd
Compare
5198ebd to
a509ca5
Compare



Note
Low Risk
Changes are confined to benchmark/test harness code and primarily add an alternate send path with basic error logging; minimal impact on production logic.
Overview
Extends the broadcast stress-test node
MessageSenderwith a new SQMR variant and send path usingSqmrClientSender.When using SQMR,
send_messagenow issues a query viasend_new_query, spawns a task to drain the response stream, and logs failures viatracing::errorinstead of panicking; protocol registration for SQMR remainstodo!.Written by Cursor Bugbot for commit a509ca5. This will update automatically on new commits. Configure here.