Skip to content

Commit

Permalink
Merge pull request redpanda-data#16494 from mmaslankaprv/vbotbuildovi…
Browse files Browse the repository at this point in the history
…ch/backport-16304-v23.2.x-121

[v23.2.x] Wrapped logging with `vlog` macro in places that missed it
  • Loading branch information
piyushredpanda authored Feb 7, 2024
2 parents d965dc9 + db93dad commit 775c7d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/v/cluster/partition_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ void partition_manager::check_partitions_shutdown_state() {
const auto now = ss::lowres_clock::now();
for (auto& state : _partitions_shutting_down) {
if (state.last_update_timestamp < now - _partition_shutdown_timeout()) {
clusterlog.error(
vlog(
clusterlog.error,
"partition {} shutdown takes longer than expected, current "
"shutdown stage: {} time since last update: {} seconds",
state.partition->ntp(),
Expand Down
29 changes: 19 additions & 10 deletions src/v/rpc/rpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,37 +210,46 @@ ss::future<> rpc_server::dispatch_method_once(
ctx->pr.set_exception(e);
return ss::now();
} catch (const ss::timed_out_error& e) {
rpclog.debug("Timing out request on timed_out_error "
"(shutting down)");
vlog(
rpclog.debug,
"Timing out request on timed_out_error "
"(shutting down)");
reply_buf.set_status(rpc::status::request_timeout);
} catch (const ss::condition_variable_timed_out& e) {
rpclog.debug(
vlog(
rpclog.debug,
"Timing out request on condition_variable_timed_out");
reply_buf.set_status(rpc::status::request_timeout);
} catch (const ss::gate_closed_exception& e) {
// gate_closed is typical during shutdown. Treat
// it like a timeout: request was not erroneous
// but we will not give a rseponse.
rpclog.debug(
vlog(
rpclog.debug,
"Timing out request on gate_closed_exception "
"(shutting down)");
reply_buf.set_status(rpc::status::request_timeout);
} catch (const ss::broken_condition_variable& e) {
rpclog.debug(
vlog(
rpclog.debug,
"Timing out request on broken_condition_variable "
"(shutting down)");
reply_buf.set_status(rpc::status::request_timeout);
} catch (const ss::abort_requested_exception& e) {
rpclog.debug(
vlog(
rpclog.debug,
"Timing out request on abort_requested_exception "
"(shutting down)");
reply_buf.set_status(rpc::status::request_timeout);
} catch (const ss::broken_semaphore& e) {
rpclog.debug("Timing out request on broken_semaphore "
"(shutting down)");
vlog(
rpclog.debug,
"Timing out request on broken_semaphore "
"(shutting down)");
reply_buf.set_status(rpc::status::request_timeout);
} catch (...) {
rpclog.error(
vlog(
rpclog.error,
"Service handler threw an exception: {}",
std::current_exception());
probe().service_error();
Expand Down Expand Up @@ -268,7 +277,7 @@ ss::future<> rpc_server::dispatch_method_once(
});
})
.handle_exception([](const std::exception_ptr& e) {
rpclog.error("Error dispatching: {}", e);
vlog(rpclog.error, "Error dispatching: {}", e);
});

return fut;
Expand Down
6 changes: 4 additions & 2 deletions src/v/rpc/transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ transport::connect(rpc::clock_type::time_point connection_timeout) {
} catch (...) {
auto e = std::current_exception();
if (net::is_disconnect_exception(e)) {
rpc::rpclog.info(
vlog(
rpc::rpclog.info,
"Disconnected from server {}: {}",
server_address(),
e);
} else {
rpc::rpclog.error(
vlog(
rpc::rpclog.error,
"Error dispatching client reads to {}: {}",
server_address(),
e);
Expand Down

0 comments on commit 775c7d8

Please sign in to comment.