Skip to content

Commit

Permalink
Merge pull request #6224 from mmaslankaprv/fix-6201
Browse files Browse the repository at this point in the history
rpc/simple_protocol: disambiguate condition variable timeout exception
  • Loading branch information
rystsov committed Aug 26, 2022
2 parents 0338245 + 451420f commit 417f150
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 417f150

Please sign in to comment.