mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-13 03:12:13 +00:00
The `try-catch` expression is pretty much useless in its current form. If we return the future, the awaiting will only be performed by the caller, completely circumventing the exception handling. As a result, instead of handling `raft::request_aborted` with a proper error message, the user will face `seastar::abort_requested_exception` whose message is cryptic at best. It doesn't even point to the root of the problem. Fixes SCYLLADB-665 Backport: This is a small improvement and may help when debugging, so let's backport it to all supported versions. - (cherry picked from commitc36623baad) - (cherry picked from commite4f2b62019) - (cherry picked from commitfae71f79c2) Parent PR: #28624 Closes scylladb/scylladb#28753 * https://github.com/scylladb/scylladb: test: raft: Add test_aborting_wait_for_state_change raft: Describe exception types for wait_for_state_change and wait_for_leader raft: Await instead of returning future in wait_for_state_change --- Changes made for the backport: * wait_for_leader is a private member function, so we omit extending its description. * The provided test originally used wait_for_leader. Since it's private, we replace it with wait_election_done. It should have the same effect, and the test should behave in its original form. Closes scylladb/scylladb#29594 Closes scylladb/scylladb#29724