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

[v23.2.x] Add forward iterator to async_for_each #16689

Merged

Conversation

travisdowns
Copy link
Member

Backport of PR #16676

async_for_each originally assumed random access iterators, but we
can also support forward iterators at the cost of some complexity.

The main limitation with forward iterators is that we cannot do
arithmetic on the iterators to determine the size of the range and
to pre-calculate end iterators. So we use counted loops instead when
those iterators are used (we dispatch to a separate path for random
access iterators).

(cherry picked from commit c667749)
@travisdowns travisdowns added this to the v23.2.x-next milestone Feb 23, 2024
@travisdowns travisdowns added the kind/backport PRs targeting a stable branch label Feb 23, 2024
@travisdowns travisdowns marked this pull request as ready for review February 23, 2024 02:11
@travisdowns
Copy link
Member Author

@StephanDollberg - this is a straight backport of the dev changes except that I dropped the edits to the test as the test does not exist in 23.2 (per the backport of the original change).

@travisdowns travisdowns merged commit 3c5e552 into redpanda-data:v23.2.x Feb 23, 2024
23 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.27 Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants