Skip to content

Commit

Permalink
Merge pull request #24418 from Lazin/fix/CORE-8392
Browse files Browse the repository at this point in the history
[CORE-8392] http: Shutdown connection if shutdown_now was called
  • Loading branch information
Lazin authored Dec 23, 2024
2 parents 38fdff4 + f412a2c commit fa89461
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v/cloud_storage_clients/client_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ ss::future<> client_pool::stop() {
}

void client_pool::shutdown_connections() {
vlog(pool_log.info, "Shutting down client pool: {}", _pool.size());
vlog(
pool_log.info,
"Shutting down client pool: {} ({} connections leased)",
_pool.size(),
_leased.size());

_as.request_abort();
_cvar.broken();
Expand Down
5 changes: 5 additions & 0 deletions src/v/http/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ ss::future<reconnect_result_t> client::get_connected(
vlog(
ctxlog.debug,
"Stopping connect attempts due to shutdown request");
if (is_valid()) {
// We might have established connection at this point
// which has to be closed.
shutdown();
}
co_return reconnect_result_t::timed_out;
}
current = ss::lowres_clock::now();
Expand Down

0 comments on commit fa89461

Please sign in to comment.