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

Overlay: Do not initiate connections that will be immediately dropped #4083

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

bboston7
Copy link
Contributor

@bboston7 bboston7 commented Dec 5, 2023

Description

This change ensures that the overlay does not initiate outbound connections when it is shutting down (and therefore OverlayManagerImpl::addOutboundConnection will immediately drop the connection).

This change also adds a line to the logs indicating how to increase the number of outbound pending slots when
OverlayManagerImpl::connectToImpl fails due to insufficient slots.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copy link
Contributor

@marta-lokhova marta-lokhova left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I had a small cleanup suggestion

src/overlay/OverlayManagerImpl.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@marta-lokhova marta-lokhova left a comment

Choose a reason for hiding this comment

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

Looks great, thank you! Please squash the commits, and we'll merge

This change ensures that the overlay does not initiate outbound
connections when it is shutting down (and therefore
`OverlayManagerImpl::addOutboundConnection` will immediately drop the
connection).

This change also adds a line to the logs indicating how to increase the
number of outbound pending slots when
`OverlayManagerImpl::connectToImpl` fails due to insufficient slots.
@marta-lokhova
Copy link
Contributor

r+ 2c55512

@latobarita latobarita merged commit 89b1dcd into stellar:master Dec 19, 2023
15 checks passed
@bboston7 bboston7 deleted the outbound-connection-drop branch December 19, 2023 17: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.

3 participants