From dc0d6cf30f07680b6f83d3d28b3dad0936884ffe Mon Sep 17 00:00:00 2001 From: Michael Boquard Date: Fri, 12 Jan 2024 16:23:47 -0500 Subject: [PATCH] pp/sr: Added adjustable inflight semaphore to context Signed-off-by: Michael Boquard --- src/v/pandaproxy/rest/proxy.cc | 2 +- src/v/pandaproxy/schema_registry/service.cc | 2 +- src/v/pandaproxy/server.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/v/pandaproxy/rest/proxy.cc b/src/v/pandaproxy/rest/proxy.cc index fb8146baee1b..e886090b414c 100644 --- a/src/v/pandaproxy/rest/proxy.cc +++ b/src/v/pandaproxy/rest/proxy.cc @@ -116,7 +116,7 @@ proxy::proxy( , _inflight_config_binding(config::shard_local_cfg().max_in_flight_pandaproxy_requests_per_shard.bind()) , _client(client) , _client_cache(client_cache) - , _ctx{{{{}, _mem_sem, {}, smp_sg}, *this}, + , _ctx{{{{}, _mem_sem, _inflight_sem, {}, smp_sg}, *this}, {config::always_true(), config::shard_local_cfg().superusers.bind(), controller}, _config.pandaproxy_api.value()} , _server( diff --git a/src/v/pandaproxy/schema_registry/service.cc b/src/v/pandaproxy/schema_registry/service.cc index 5c4693a6e15b..2e2f02124ff0 100644 --- a/src/v/pandaproxy/schema_registry/service.cc +++ b/src/v/pandaproxy/schema_registry/service.cc @@ -509,7 +509,7 @@ service::service( config::shard_local_cfg() .max_in_flight_schema_registry_requests_per_shard.bind()) , _client(client) - , _ctx{{{}, _mem_sem, {}, smp_sg}, *this} + , _ctx{{{}, _mem_sem, _inflight_sem, {}, smp_sg}, *this} , _server( "schema_registry", // server_name "schema_registry", // public_metric_group_name diff --git a/src/v/pandaproxy/server.h b/src/v/pandaproxy/server.h index 34760b091e7e..93de1d6b5b93 100644 --- a/src/v/pandaproxy/server.h +++ b/src/v/pandaproxy/server.h @@ -21,6 +21,7 @@ #include "pandaproxy/kafka_client_cache.h" #include "pandaproxy/types.h" #include "security/request_auth.h" +#include "utils/adjustable_semaphore.h" #include #include @@ -70,6 +71,7 @@ class server { struct context_t { std::vector advertised_listeners; ssx::semaphore& mem_sem; + adjustable_semaphore& inflight_sem; ss::abort_source as; ss::smp_service_group smp_sg; };