Skip to content

Commit

Permalink
cluster: use start_single where appropriate
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jcsp committed Jul 27, 2022
1 parent 36d885b commit ce9e3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/v/cluster/controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit ce9e3da

Please sign in to comment.