mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
topology_coordinator: consistently rethrow raft::request_aborted for direct/global commands
Ensure all direct and global topology commands rethrow the
`raft::request_aborted` exception when aborted, typically due to
leadership changes. This makes abortion explicit to callers, enabling
proper handling such as retries or workflow termination.
This change completes the work started in PR scylladb/scylladb#23962,
covering all remaining cases where the exception was not rethrown.
Fixes: scylladb/scylladb#23589
(cherry picked from commit 943af1ef1c)
This commit is contained in:
@@ -2552,6 +2552,8 @@ class topology_coordinator : public endpoint_lifecycle_subscriber {
|
||||
node.guard = co_await exec_global_command(std::move(node.guard),raft_topology_cmd::command::barrier_and_drain, get_excluded_nodes(node), drop_guard_and_retake::yes);
|
||||
} catch (term_changed_error&) {
|
||||
throw;
|
||||
} catch (raft::request_aborted&) {
|
||||
throw;
|
||||
} catch(...) {
|
||||
rtlogger.warn("failed to run barrier_and_drain during rollback of {} after {} failure: {}",
|
||||
node.id, state, std::current_exception());
|
||||
@@ -2629,6 +2631,8 @@ class topology_coordinator : public endpoint_lifecycle_subscriber {
|
||||
}
|
||||
} catch (term_changed_error&) {
|
||||
throw;
|
||||
} catch (raft::request_aborted&) {
|
||||
throw;
|
||||
} catch(...) {
|
||||
wait_for_ip_error = std::current_exception();
|
||||
rtlogger.warn("raft_topology_cmd::command::wait_for_ip failed, error {}",
|
||||
@@ -2751,6 +2755,8 @@ class topology_coordinator : public endpoint_lifecycle_subscriber {
|
||||
rtbuilder.done();
|
||||
} catch (term_changed_error&) {
|
||||
throw;
|
||||
} catch (raft::request_aborted&) {
|
||||
throw;
|
||||
} catch (...) {
|
||||
rtlogger.error("send_raft_topology_cmd(stream_ranges) failed with exception"
|
||||
" (node state is rebuilding): {}", std::current_exception());
|
||||
|
||||
Reference in New Issue
Block a user