-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(network): handle report receiver #2234
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2234 +/- ##
==========================================
- Coverage 66.33% 66.32% -0.02%
==========================================
Files 139 139
Lines 18346 18391 +45
Branches 18346 18391 +45
==========================================
+ Hits 12169 12197 +28
- Misses 4884 4898 +14
- Partials 1293 1296 +3 ☔ View full report in Codecov by Sentry. |
6d28dd5
to
bef8ce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @eitanm-starkware)
crates/papyrus_network/src/network_manager/mod.rs
line 359 at r1 (raw file):
); if let Some(report_receiver) = self.sqmr_outbound_report_receivers.remove(&outbound_session_id)
rename sqmr_outbound_report_receivers to sqmr_outbound_report_receivers_waiting_assignment
crates/papyrus_network/src/network_manager/mod.rs
line 361 at r1 (raw file):
self.sqmr_outbound_report_receivers.remove(&outbound_session_id) { self.handle_report_receiver(peer_id, report_receiver)
rename handle_report_receiver to handle_new_report_receiver
crates/papyrus_network/src/network_manager/mod.rs
line 386 at r1 (raw file):
self.sqmr_outbound_report_receivers.remove(&outbound_session_id) { error!("Report receiver was not consumed. Dropping it.");
This is not an error. change the log level to debug/info and type "Outbound session failed before peer assigned to it. Ignoring incoming reports for the session."
crates/papyrus_network/src/network_manager/mod.rs
line 398 at r1 (raw file):
self.sqmr_outbound_report_receivers.remove(&outbound_session_id) { error!("Report receiver was not consumed. Dropping it.");
Change the error message here to. "Outbound session finished with no messages in it. Ignoring incoming reports for the session"
Regarding the error log level, right now it's not an error since you can close a session with no messages in it. But in the future I'd expect us to remove report receivers from sqmr_outbound_report_receivers
once the session is assigned and not once we got a response, and then this should be error log level, so I'm ok with either one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @eitanm-starkware)
bef8ce6
to
5d80636
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_network/src/network_manager/mod.rs
line 359 at r1 (raw file):
Previously, ShahakShama wrote…
rename sqmr_outbound_report_receivers to sqmr_outbound_report_receivers_waiting_assignment
Done.
crates/papyrus_network/src/network_manager/mod.rs
line 361 at r1 (raw file):
Previously, ShahakShama wrote…
rename handle_report_receiver to handle_new_report_receiver
Done.
crates/papyrus_network/src/network_manager/mod.rs
line 386 at r1 (raw file):
Previously, ShahakShama wrote…
This is not an error. change the log level to debug/info and type "Outbound session failed before peer assigned to it. Ignoring incoming reports for the session."
Done.
crates/papyrus_network/src/network_manager/mod.rs
line 398 at r1 (raw file):
Previously, ShahakShama wrote…
Change the error message here to. "Outbound session finished with no messages in it. Ignoring incoming reports for the session"
Regarding the error log level, right now it's not an error since you can close a session with no messages in it. But in the future I'd expect us to remove report receivers fromsqmr_outbound_report_receivers
once the session is assigned and not once we got a response, and then this should be error log level, so I'm ok with either one
leaving as error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware)
This change is