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

Disconnect worst peer #6443

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Disconnect worst peer #6443

merged 9 commits into from
Jan 31, 2024

Conversation

pinges
Copy link
Contributor

@pinges pinges commented Jan 22, 2024

PR description

In AbstractRetryingSwitchingPeerTask.java the method refreshPeers() we are now disconnecting the least useful peer.
Another change is that now the peer table is refreshed until we have reached our maxPeers.

Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

@pinges pinges marked this pull request as ready for review January 31, 2024 01:48
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

the code makes sense. have you tried it out on a running node?

…anager/task/AbstractRetryingSwitchingPeerTask.java

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Stefan Pingel <[email protected]>
@pinges pinges enabled auto-merge (squash) January 31, 2024 02:18
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

makes sense to me

@pinges pinges merged commit 497faef into hyperledger:main Jan 31, 2024
18 checks passed
@pinges pinges deleted the DisconnectWorstPeer branch January 31, 2024 05:50
Gabriel-Trintinalia pushed a commit to Gabriel-Trintinalia/besu that referenced this pull request Feb 1, 2024
* When refreshing, only disconnect a peer if we have max peers
* If we are disconnecting a peer, disconnect the least useful peer

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Stefan Pingel <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
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