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

c/leader_balancer: use btree_map as a group to revision index #11706

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Jun 27, 2023

In a system where there is a lot of raft groups using absl::flat_hash_map to store mapping from raft::group_id to model::revision_id might lead to large contiguous allocation.

Replaced flat_hash_map with btree_map as the code is not performance critical.

Fixes: #11670

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
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • none

In a system where there is a lot of raft groups using
`absl::flat_hash_map` to store mapping from `raft::group_id` to
`model::revision_id` might lead to large contiguous allocation.

Replaced `flat_hash_map` with `btree_map` as the code is not performance
critical.

Fixes: redpanda-data#11670

Signed-off-by: Michal Maslanka <michal@redpanda.com>
@bharathv bharathv merged commit e9770ea into redpanda-data:dev Jun 27, 2023
19 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v23.1.x

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.

Oversized allocation: 278528 bytes in cluster::leader_balancer::build_group_id_to_topic_rev
3 participants