Skip to content

Commit

Permalink
r/stm_manager: do not log shutdown exception when applying snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Nov 20, 2023
1 parent 438e31e commit 8390040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/v/raft/state_machine_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ ss::future<> state_machine_manager::apply_raft_snapshot() {
co_await snapshot->reader.close();
if (fut.failed()) {
const auto e = fut.get_exception();
vlog(_log.error, "error applying raft snapshot - {}", e);
// do not log known shutdown exceptions as errors
if (!ssx::is_shutdown_exception(e)) {
vlog(_log.error, "error applying raft snapshot - {}", e);
}
std::rethrow_exception(e);
}
}
Expand Down

0 comments on commit 8390040

Please sign in to comment.