From 00b161487afb06dfdcb6df795446e4f666fdac3f Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Thu, 21 Dec 2023 16:01:18 -0600 Subject: [PATCH] c/s/leader_balancer: prevent oversized alloc When there are many topics within in a system we can get oversized allocations, so switch to a btree_map. Signed-off-by: Tyler Rockwood (cherry picked from commit c892e63c7726ca2fea63df02b221ecfd4d37c28a) --- src/v/cluster/scheduling/leader_balancer_constraints.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v/cluster/scheduling/leader_balancer_constraints.h b/src/v/cluster/scheduling/leader_balancer_constraints.h index a8ceb7cd18654..265481d152397 100644 --- a/src/v/cluster/scheduling/leader_balancer_constraints.h +++ b/src/v/cluster/scheduling/leader_balancer_constraints.h @@ -131,7 +131,7 @@ class even_topic_distributon_constraint final using topic_id_t = model::revision_id::type; template - using topic_map = absl::flat_hash_map; + using topic_map = absl::btree_map; public: even_topic_distributon_constraint(