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

net: eliminate indirection through net::server:resources type #7883

Merged
merged 7 commits into from
Dec 21, 2022

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented Dec 21, 2022

The structure net::server:resources was a container for a shared_ptr<net::connection> and a reference to the underlying server and a selection of accessors for server resources.

Where #7860 flattened the net::protocol into net::server, this change flattens connection handling. For example, in many cases accesses to the server through the net::server:resources object is made in the context the net::server subclass, and these resources can be accessed directly rather than requiring the extra hop through the resources object.

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

Release Notes

  • none

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
virtual ss::future<> apply(resources) = 0;
virtual ss::future<> apply(ss::lw_shared_ptr<net::connection>) = 0;

server_probe& probe() { return _probe; }
Copy link
Contributor

Choose a reason for hiding this comment

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

private or protected?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's public

Copy link
Contributor

@jcsp jcsp left a comment

Choose a reason for hiding this comment

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

🤌

@dotnwat dotnwat merged commit 4e3ef8b into redpanda-data:dev Dec 21, 2022
@dotnwat dotnwat deleted the net-server-resources branch January 4, 2023 02:34
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants