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.1.x] storage: fix coroutine iteration over _segs #11969

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #11956

Noah noted that the current iteration is unsafe because nothing ensures
that _segs iterators remain stable across the scheduling points.

This patch fixes this by collecting all-bogus segments and tweaking them
at the end of the method, where we can guarantee that the container
doesn't change.

(cherry picked from commit 9a9813b)
@vbotbuildovich vbotbuildovich added this to the v23.1.x-next milestone Jul 10, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 10, 2023
@vbotbuildovich vbotbuildovich requested a review from dotnwat July 10, 2023 09:12
Copy link
Member

@BenPope BenPope left a comment

Choose a reason for hiding this comment

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

LGTM

@BenPope BenPope marked this pull request as ready for review July 18, 2023 09:52
@piyushredpanda piyushredpanda merged commit caa95d8 into redpanda-data:v23.1.x Jul 19, 2023
@BenPope BenPope modified the milestones: v23.1.x-next, v23.1.14 Aug 7, 2023
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.

4 participants