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.3.x] c/topic_table: replaced partition metadata map with chunked_vector #17093

Conversation

mmaslankaprv
Copy link
Member

Backport of PR #16919

Create a nice way to simulate `zip` similar to the python function for
two different containers.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Contiguous range map is an associative sorted container backed by
chunked_vector designed to efficiently store objects indexed with
contiguous and limited range of integers. The container provides a
wrapper around basic chunked vector that reassembles API of a standard map.

The wrapper allows random inserts of elements to the map event tho this is
not supported by standard vector.

Underlying container is resized every time its size is not sufficient to
account for emplaced key.

The contiguous_range_map tolerates gap in the range of keys however
number and size of gaps is proportional to performance penalty hit when
incrementing or decrementing iterators.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 0a67885)
Signed-off-by: Michal Maslanka <michal@redpanda.com>
To avoid large allocations and still provide good performance, replaced
the `absl::node_hash_map` containing per partition metadata with
`contiguous_range_map` which is backed by chunked vector.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 16fb270)
@mmaslankaprv mmaslankaprv force-pushed the vbotbuildovich/backport-16919-v23.3.x-938 branch from 530fe69 to 590e3f5 Compare March 14, 2024 16:14
@piyushredpanda piyushredpanda merged commit 5530f7b into redpanda-data:v23.3.x Mar 15, 2024
16 checks passed
@BenPope BenPope added this to the v23.3.8 milestone Mar 15, 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.

None yet

4 participants