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

Mandate flow control in bytes #4353

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

bboston7
Copy link
Contributor

@bboston7 bboston7 commented Jun 7, 2024

Resolves #3781 and #4374.

This change removes the ENABLE_FLOW_CONTROL_BYTES config option and always uses flow control in bytes.

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

src/main/Config.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@SirTyson SirTyson left a comment

Choose a reason for hiding this comment

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

LGTM, one comment on changing a flow control bytes check to make deprecation easier.

src/main/Config.cpp Outdated Show resolved Hide resolved
src/overlay/Peer.cpp Outdated Show resolved Hide resolved
src/overlay/Peer.cpp Outdated Show resolved Hide resolved
SirTyson
SirTyson previously approved these changes Jun 20, 2024
Copy link
Contributor

@SirTyson SirTyson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the changes!

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.

I think you can go further with this change and remove support for disabling flow control in bytes completely:

  • Minimum overlay version is far beyond FIRST_VERSION_SUPPORTING_FLOW_CONTROL_IN_BYTES at this point, so most (if not all) nodes on the network will have the feature enabled
  • I doubt there are any nodes outside of our infra that are manually tuning this config. Looking at a snapshot of peers on one of the watchers, I don't see anyone not using the feature.
  • I think we can remove any conditional enabling of flow control in bytes, and just implicitly set it to true. You might be able to get rid of the annoying FlowControl::start call at the end of authentication as well, and basically start flow control automatically when we create Peer.
  • We also don't need to set AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED anymore. I'd suggest we set auth flags back to 0, so we can use it for future feature rollout. AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED can be deprecated.
  • We still need to bump overlay version. While we're at it: the network recently upgraded to v21, so we can actually bump minimum overlay version as well to the one that supports v21 (meaning that we can drop all v20 clients now)
  • Dropping support for this flag means we can drop all the tests dealing with mixed modes. Yay to code removal!

src/main/Config.cpp Outdated Show resolved Hide resolved
@bboston7
Copy link
Contributor Author

I fully removed the option to disable flow control in bytes and simplified the flow control code. I also bumped the minimum overlay version. This is now ready for another round of review!

src/overlay/test/OverlayTests.cpp Show resolved Hide resolved
src/overlay/test/OverlayTests.cpp Show resolved Hide resolved
src/overlay/OverlayManagerImpl.cpp Outdated Show resolved Hide resolved
src/overlay/Peer.cpp Show resolved Hide resolved
src/main/Config.cpp Outdated Show resolved Hide resolved
This change removes the `ENABLE_FLOW_CONTROL_BYTES` config option and
always uses flow control bytes.
@marta-lokhova marta-lokhova added this pull request to the merge queue Aug 7, 2024
Merged via the queue into stellar:master with commit ec3c8e8 Aug 7, 2024
14 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Aug 8, 2024
* Minor follow up to #4353 to harden tests
* Bump medida
@bboston7 bboston7 deleted the flow-control-bytes branch September 16, 2024 22:44
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.

Make flow control in bytes required
3 participants