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

[v22.3.x] c/topic_table: switch _pending_deltas to fragmented_vector #10618

Merged
merged 4 commits into from
May 9, 2023

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented May 8, 2023

Backport of PR #9738
Fixes #10530

travisdowns and others added 4 commits May 8, 2023 21:57
In that method we created a deltas container and emplaced values
into it, then moved this value to the end of the pending deltas
member. This results in an extra move versus simply emplacing
the deltas directly in the member.

The deltas are non-trivial objects and the moves are in some
cases relatively expensive (since e.g., they have to copy all the bytes
of ss::string which has a small-string optimization).

Instead, just emplace the values directly in the pending
deltas array. There are no suspension points so this is safe and
equivalent to the old behavior.

Fixes redpanda-data#7669.

(cherry picked from commit 9d981d5)
_pending_deltas can get pretty big at startup and (soon) after applying
a controller snapshot. So we switch it to fragmented_vector to avoid
large contiguous allocations.

(cherry picked from commit 8c3663e)
(also contains changes from commit e3abe27)
@ztlpn ztlpn requested review from bharathv and ballard26 May 8, 2023 20:01
@BenPope BenPope added this to the v22.3.x-next milestone May 8, 2023
@BenPope BenPope added the kind/backport PRs targeting a stable branch label May 8, 2023
@ztlpn
Copy link
Contributor Author

ztlpn commented May 9, 2023

test error is #8383

@ztlpn ztlpn merged commit f4691db into redpanda-data:v22.3.x May 9, 2023
24 of 26 checks passed
@vshtokman vshtokman modified the milestones: v22.3.x-next, v22.3.18 May 9, 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.

None yet

5 participants