Skip to content

Commit

Permalink
redpanda: Allocate kafka::usage_manager at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
graphcareful committed Mar 16, 2023
1 parent 942d64c commit e22d9f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/v/redpanda/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#include "kafka/server/rm_group_frontend.h"
#include "kafka/server/server.h"
#include "kafka/server/snc_quota_manager.h"
#include "kafka/server/usage_manager.h"
#include "model/fundamental.h"
#include "model/metadata.h"
#include "net/server.h"
Expand Down Expand Up @@ -1340,6 +1341,9 @@ void application::wire_up_redpanda_services(model::node_id node_id) {
controller.get())
.get();

syschecks::systemd_message("Creating kafka usage manager frontend").get();
construct_service(usage_manager, std::ref(storage)).get();

syschecks::systemd_message("Creating tx coordinator frontend").get();
// usually it'a an anti-pattern to let the same object be accessed
// from different cores without precautionary measures like foreign
Expand Down Expand Up @@ -2022,6 +2026,7 @@ void application::start_runtime_services(

quota_mgr.invoke_on_all(&kafka::quota_manager::start).get();
snc_quota_mgr.invoke_on_all(&kafka::snc_quota_manager::start).get();
usage_manager.invoke_on_all(&kafka::usage_manager::start).get();

if (!config::node().admin().empty()) {
_admin.invoke_on_all(&admin_server::start).get0();
Expand Down
1 change: 1 addition & 0 deletions src/v/redpanda/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class application {
ss::sharded<kafka::quota_manager> quota_mgr;
ss::sharded<kafka::snc_quota_manager> snc_quota_mgr;
ss::sharded<kafka::rm_group_frontend> rm_group_frontend;
ss::sharded<kafka::usage_manager> usage_manager;

ss::sharded<raft::group_manager> raft_group_manager;
ss::sharded<raft::recovery_throttle> recovery_throttle;
Expand Down

0 comments on commit e22d9f0

Please sign in to comment.