Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc/simple_protocol: disambiguate condition variable timeout exception #6224

Merged
merged 2 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/v/rpc/simple_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "rpc/types.h"
#include "ssx/semaphore.h"

#include <seastar/core/condition-variable.hh>
#include <seastar/core/future-util.hh>

#include <exception>
Expand Down Expand Up @@ -183,6 +184,10 @@ simple_protocol::dispatch_method_once(header h, net::server::resources rs) {
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(
"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
Expand Down
4 changes: 4 additions & 0 deletions tests/rptest/tests/controller_upgrade_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
# <= 22.2 versions may log bare std::exception error
# (https://github.com/redpanda-data/redpanda/issues/5886)
re.compile("rpc - .*std::exception"),
# <= 22.2 versions may log bare seastar::condition_variable_timed_out error
re.compile(
"rpc - Service handler threw an exception: seastar::condition_variable_timed_out"
),
]


Expand Down