Skip to content

Commit

Permalink
Assert and log total_home
Browse files Browse the repository at this point in the history
I have a theory total_home (only set on shard0's service) could be ran
using a service from another shard, but on shard0. We should add
assertions and logs for what total_allowance is because that's what the
stacktrace reported as crashing.
  • Loading branch information
rockwotj committed May 12, 2023
1 parent 74cdea8 commit 8f1f396
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/v/net/conn_quota.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,11 @@ void conn_quota::do_put(ss::net::inet_address addr) {

auto home_shard = addr_to_shard(addr);
if (home_shard == ss::this_shard_id()) {
vlog(rpc::rpclog.trace, "do_put: release directly to home");
auto allowance = get_home_allowance(addr);
vlog(
rpc::rpclog.trace,
"do_put: release directly to home allowance={}",
allowance);
allowance->put();
if (should_leave_reclaim(*allowance)) {
cancel_reclaim_to(addr, allowance);
Expand Down

0 comments on commit 8f1f396

Please sign in to comment.