Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

eitanm-starkware
Copy link
Contributor

@eitanm-starkware eitanm-starkware commented Jul 18, 2024

This change is Reviewable

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 39.13043% with 14 lines in your changes missing coverage. Please review.

Project coverage is 66.32%. Comparing base (e23be56) to head (5d80636).
Report is 10 commits behind head on main.

Files Patch % Lines
crates/papyrus_network/src/network_manager/mod.rs 39.13% 14 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@eitanm-starkware eitanm-starkware force-pushed the eitan/handle_report_receiver branch from 6d28dd5 to bef8ce6 Compare July 18, 2024 09:28
Copy link
Contributor

@ShahakShama ShahakShama left a 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

Copy link
Contributor

@ShahakShama ShahakShama left a 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)

@eitanm-starkware eitanm-starkware force-pushed the eitan/handle_report_receiver branch from bef8ce6 to 5d80636 Compare July 23, 2024 08:30
Copy link
Contributor Author

@eitanm-starkware eitanm-starkware left a 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 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

leaving as error

Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants