Skip to content

Commit

Permalink
resource_mgmt/smp: add smp group for transforms
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
  • Loading branch information
rockwotj committed Jan 16, 2024
1 parent 895af5f commit d018c59
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/v/resource_mgmt/smp_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ class smp_groups {
= default_max_nonlocal_requests;
uint32_t cluster_group_max_non_local_requests
= default_max_nonlocal_requests;

uint32_t proxy_group_max_non_local_requests
= default_max_nonlocal_requests;
uint32_t transform_group_max_non_local_requests
= default_max_nonlocal_requests;
};

smp_groups() = default;
Expand All @@ -45,18 +46,22 @@ class smp_groups {
cfg.cluster_group_max_non_local_requests);
_proxy = co_await create_service_group(
cfg.proxy_group_max_non_local_requests);
_transform = co_await create_service_group(
cfg.transform_group_max_non_local_requests);
}

ss::smp_service_group raft_smp_sg() { return *_raft; }
ss::smp_service_group kafka_smp_sg() { return *_kafka; }
ss::smp_service_group cluster_smp_sg() { return *_cluster; }
ss::smp_service_group proxy_smp_sg() { return *_proxy; }
ss::smp_service_group transform_smp_sg() { return *_transform; }

ss::future<> destroy_groups() {
return destroy_smp_service_group(*_kafka)
.then([this] { return destroy_smp_service_group(*_raft); })
.then([this] { return destroy_smp_service_group(*_cluster); })
.then([this] { return destroy_smp_service_group(*_proxy); });
co_await destroy_smp_service_group(*_kafka);
co_await destroy_smp_service_group(*_raft);
co_await destroy_smp_service_group(*_cluster);
co_await destroy_smp_service_group(*_proxy);
co_await destroy_smp_service_group(*_transform);
}

static uint32_t
Expand Down Expand Up @@ -97,4 +102,5 @@ class smp_groups {
std::unique_ptr<ss::smp_service_group> _kafka;
std::unique_ptr<ss::smp_service_group> _cluster;
std::unique_ptr<ss::smp_service_group> _proxy;
std::unique_ptr<ss::smp_service_group> _transform;
};

0 comments on commit d018c59

Please sign in to comment.