diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index 66278afdb666ee..e3ac43c734a9f3 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -57,6 +57,7 @@ #include "agent/utils.h" #include "common/config.h" #include "common/consts.h" +#include "common/exception.h" #include "common/logging.h" #include "common/signal_handler.h" #include "common/status.h" @@ -1788,8 +1789,7 @@ void Tablet::execute_compaction(CompactionMixin& compaction) { MonotonicStopWatch watch; watch.start(); - Status res = compaction.execute_compact(); - + Status res = [&]() { RETURN_IF_CATCH_EXCEPTION({ return compaction.execute_compact(); }); }(); if (!res.ok()) [[unlikely]] { set_last_failure_time(this, compaction, UnixMillis()); LOG(WARNING) << "failed to do " << compaction.compaction_name()