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

GH-647: HOTFIX: Prevent duplication of records of connection-progress #213

Merged
merged 12 commits into from
Dec 31, 2022

Conversation

utkarshg6
Copy link
Collaborator

No description provided.

@@ -63,6 +63,7 @@ trait GossipHandler: NamedType + Send /* Send because lazily-written tests requi
database: &mut NeighborhoodDatabase,
agrs: Vec<AccessibleGossipRecord>,
gossip_source: SocketAddr,
peer_addrs: &[IpAddr],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you think of a better name than peer_addrs? When you're thinking about Gossip, you're probably not thinking about connection progress messages, and it's difficult to understand what a peer might be in this context. There's cpm_recipient right below it; maybe these two parameters could be named similarly to make their association clear?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used the name connection_progress_peers. I think it's conveying the correct idea.

node/src/neighborhood/gossip_acceptor.rs Outdated Show resolved Hide resolved
msg.peer_addr
);
Err(e) => {
trace!(self.logger, "{}", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this error specific enough to be able to track down if we see it in the log? Should an identifying string be added so that a codebase text search can lead us here?

Copy link
Collaborator Author

@utkarshg6 utkarshg6 Dec 23, 2022

Choose a reason for hiding this comment

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

I also wanted to add some string to this trace log before raising the PR but somehow, I didn't. Later, when you added this comment, I got a bit excited to rephrase these logs.

I've used this prefix - "Found unnecessary connection progress message".

Now, it will be easier to find the log inside our codebase.

node/src/neighborhood/mod.rs Outdated Show resolved Hide resolved
node/src/neighborhood/mod.rs Show resolved Hide resolved
node/src/neighborhood/overall_connection_status.rs Outdated Show resolved Hide resolved
node/src/neighborhood/overall_connection_status.rs Outdated Show resolved Hide resolved
@utkarshg6 utkarshg6 changed the title GH-647: HOTFIX: Prevent duplication records of connection-progress GH-647: HOTFIX: Prevent duplication of records of connection-progress Dec 27, 2022
* GH-647: rename peers_addrs to connection_progress_peers

* GH-647: provide the accurate name inside the constructor of System in the test

* GH-647: reword the trace logs for the unnecessary connection progress

* GH-647: use a unique number to generate a unique socket address for peer 2

* GH-647: add review changes for overall_connection_status.rs

* GH-647: add connection_progress_peers as a param in the mock (#216)
@utkarshg6 utkarshg6 merged commit 60012f5 into master Dec 31, 2022
@utkarshg6 utkarshg6 deleted the GH-647 branch December 31, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants