raft: abort applier fiber when a state machine aborts
After5badf20c7aapplier fiber does not stop after it gets abort error from a state machine which may trigger an assertion because previous batch is not applied. Fix it. Fixes #12863 (cherry picked from commit9bdef9158e)
This commit is contained in:
@@ -1144,7 +1144,7 @@ future<> server_impl::applier_fiber() {
|
||||
co_await _state_machine->apply(std::move(commands));
|
||||
} catch (abort_requested_exception& e) {
|
||||
logger.info("[{}] applier fiber stopped because state machine was aborted: {}", _id, e);
|
||||
co_return;
|
||||
throw stop_apply_fiber{};
|
||||
} catch (...) {
|
||||
std::throw_with_nested(raft::state_machine_error{});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user