From 4eb220d3abc08fcac3116dcdb7fb028f7126239f Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 2 Jul 2025 16:43:35 +0300 Subject: [PATCH] service: tablet_allocator: avoid large contiguous vector in make_repair_plan() make_repair_plan() allocates a temporary vector which can grow larger than our 128k basic allocation unit. Use a chunked vector to avoid stalls due to large allocations. Fixes #24713. Closes scylladb/scylladb#24801 (cherry picked from commit 0138afa63bda5cad16d3cbc77ea1b788cb355b11) Closes scylladb/scylladb#24902 --- service/tablet_allocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/tablet_allocator.cc b/service/tablet_allocator.cc index 2f4c2454c8..b861c9e58e 100644 --- a/service/tablet_allocator.cc +++ b/service/tablet_allocator.cc @@ -842,7 +842,7 @@ public: db_clock::duration repair_time_diff; }; - std::vector plans; + utils::chunked_vector plans; auto migration_tablet_ids = co_await mplan.get_migration_tablet_ids(); for (auto&& [table, tmap_] : _tm->tablets().all_tables()) { auto& tmap = *tmap_;