Skip to content

Commit

Permalink
Merge pull request #12959 from graphcareful/eviction-stm-exc-handle
Browse files Browse the repository at this point in the history
Add proper exception handler to around eviction_stm's call to replicate
  • Loading branch information
Rob Blafford authored Aug 24, 2023
2 parents 64f56c5 + a8eda91 commit a21e8e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/v/cluster/log_eviction_stm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,17 @@ ss::future<log_eviction_stm::offset_result> log_eviction_stm::replicate_command(
}
} catch (const ss::timed_out_error&) {
result = errc::timeout;
} catch (...) {
vlog(
_log.warn,
"Replicating prefix_truncate failed with exception: {}",
std::current_exception());
result = errc::replication_error;
}

if (!result) {
vlog(
_log.info,
_log.warn,
"Failed to replicate prefix_truncate command, reason: {}",
result.error());
co_return result.error();
Expand Down

0 comments on commit a21e8e7

Please sign in to comment.