Skip to content

Commit

Permalink
pp/sr: Added adjustable inflight semaphore to context
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Boquard <michael@redpanda.com>
  • Loading branch information
michael-redpanda committed Jan 12, 2024
1 parent b9c0384 commit dc0d6cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v/pandaproxy/rest/proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/v/pandaproxy/schema_registry/service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/v/pandaproxy/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <seastar/core/abort_source.hh>
#include <seastar/core/future.hh>
Expand Down Expand Up @@ -70,6 +71,7 @@ class server {
struct context_t {
std::vector<net::unresolved_address> advertised_listeners;
ssx::semaphore& mem_sem;
adjustable_semaphore& inflight_sem;
ss::abort_source as;
ss::smp_service_group smp_sg;
};
Expand Down

0 comments on commit dc0d6cf

Please sign in to comment.