utils/exceptions.cc: Added check for exceptions::request_timeout_exception in is_timeout_exception function.

It solves the issue, where in some cases a timeout exceptions in CAS operations are logged incorrectly as a general failure.

Fixes #24591

Closes scylladb/scylladb#24619

(cherry picked from commit f28bab741d)

Closes scylladb/scylladb#24687
This commit is contained in:
Szymon Malewski
2025-06-23 21:13:17 +02:00
committed by Avi Kivity
parent adab525151
commit 3bac46a18d

View File

@@ -13,7 +13,8 @@
#include <exception>
#include <system_error>
#include "exceptions.hh"
#include "utils/exceptions.hh"
#include "exceptions/exceptions.hh"
#include "utils/abi/eh_ia64.hh"
bool check_exception(system_error_lambda_t f)
@@ -65,6 +66,8 @@ bool is_timeout_exception(std::exception_ptr e) {
return true;
} else if (const auto* ex = try_catch<const std::nested_exception>(e)) {
return is_timeout_exception(ex->nested_ptr());
} else if (try_catch<exceptions::request_timeout_exception>(e)) {
return true;
}
return false;
}