From ce9e3da24f09103340bd5176d6bc101eeb4e354e Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 27 Jul 2022 14:49:34 +0100 Subject: [PATCH] cluster: use start_single where appropriate For these two classes, it became noticable when adding shutdown logging that they were instantiated on all cores, whereas only used on shard 0. Using start_single saves us a few bytes of RAM and expresses the intent more clearly. --- src/v/cluster/controller.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v/cluster/controller.cc b/src/v/cluster/controller.cc index 29b8865115aeb..707b60b9a1aa0 100644 --- a/src/v/cluster/controller.cc +++ b/src/v/cluster/controller.cc @@ -137,7 +137,7 @@ ss::future<> controller::start() { std::ref(_as)); }) .then([this] { - return _config_manager.start( + return _config_manager.start_single( std::ref(_config_preload), std::ref(_config_frontend), std::ref(_connections), @@ -205,7 +205,7 @@ ss::future<> controller::start() { std::ref(_as)); }) .then([this] { - return _backend.start( + return _backend.start_single( std::ref(_tp_state), std::ref(_shard_table), std::ref(_partition_manager),