From 80aa0fcdc24327fc14e4f5d642b6b46ffbb2ec73 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 20 Mar 2026 18:25:48 +0300 Subject: [PATCH] repair: Move repair_partition_count_estimation_ratio onto repair_service::config Signed-off-by: Pavel Emelyanov Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- main.cc | 1 + repair/row_level.cc | 2 +- repair/row_level.hh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cc b/main.cc index dfc33f8058..fbdc97b4cf 100644 --- a/main.cc +++ b/main.cc @@ -1811,6 +1811,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl return repair_service::config{ .enable_small_table_optimization_for_rbno = cfg->enable_small_table_optimization_for_rbno, .repair_hints_batchlog_flush_cache_time_in_ms = cfg->repair_hints_batchlog_flush_cache_time_in_ms, + .repair_partition_count_estimation_ratio = cfg->repair_partition_count_estimation_ratio, }; }); repair.start(std::ref(tsm), std::ref(gossiper), std::ref(messaging), std::ref(db), std::ref(proxy), std::ref(bm), std::ref(sys_ks), std::ref(view_builder), std::ref(view_building_worker), std::ref(task_manager), std::ref(mm), max_memory_repair, std::move(repair_config)).get(); diff --git a/repair/row_level.cc b/repair/row_level.cc index 9907c75bef..019800acf5 100644 --- a/repair/row_level.cc +++ b/repair/row_level.cc @@ -3495,7 +3495,7 @@ public: // To save memory and have less different conditions, we // use the estimation for RBNO repair as well. - _estimated_partitions *= _shard_task.db.local().get_config().repair_partition_count_estimation_ratio(); + _estimated_partitions *= _shard_task.rs.get_config().repair_partition_count_estimation_ratio(); } parallel_for_each(master.all_nodes(), coroutine::lambda([&] (repair_node_state& ns) -> future<> { diff --git a/repair/row_level.hh b/repair/row_level.hh index fa9dddf55e..a9dc05b291 100644 --- a/repair/row_level.hh +++ b/repair/row_level.hh @@ -113,6 +113,7 @@ public: struct config { utils::updateable_value enable_small_table_optimization_for_rbno = utils::updateable_value(true); utils::updateable_value repair_hints_batchlog_flush_cache_time_in_ms = utils::updateable_value(60*1000); + utils::updateable_value repair_partition_count_estimation_ratio = utils::updateable_value(0.1); }; private: