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

ssx/single_sharded: improve argument and ret val processing, improve tests #20806

Closed

Conversation

bashtanov
Copy link
Contributor

  • make argument processing consistent with ss::sharded<Service>::invoke_on, i.e. make them value moved or copied even if lvalue was provided, and only pass on a reference via std::reference_wrapper
  • accept a pointer to method as a callable
  • tidy up the tests

ss::sharded<Service>::invoke_on is weird indeed, as it

  1. moves from lvalue arguments
  2. copies the function unnecessarily
    Since it doesn't bother anyone let's mimic its quirks to reduce the surprise at least for those aware of them.

Backports Required

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

Release Notes

  • none

…tests

- make argument processing consistent with ss::sharded<Service>::invoke_on,
i.e. make them value moved or copied even if lvalue was provided, and only
pass on a reference via std::reference_wrapper
- accept a pointer to method as a callable
- tidy up the tests
@bashtanov bashtanov marked this pull request as ready for review July 1, 2024 17:33
@bashtanov
Copy link
Contributor Author

failure

@bashtanov bashtanov closed this Jul 9, 2024
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.

1 participant