Add DBA_ERROR if archive encounter fatal error

This commit is contained in:
obdev
2023-02-08 11:27:08 +08:00
committed by ob-robot
parent 5d870baf2c
commit 06c5eca1cf
6 changed files with 40 additions and 4 deletions

View File

@ -11,6 +11,7 @@
*/
#include <cstdint>
#include "lib/oblog/ob_log_module.h"
#include "lib/time/ob_time_utility.h"
#include "lib/utility/ob_macro_utils.h"
#include "ob_archive_fetcher.h"
@ -32,6 +33,7 @@
#include "objit/common/ob_item_type.h" // print
#include "share/ob_debug_sync.h" // DEBUG_SYNC
#include "share/ob_debug_sync_point.h" // LOG_ARCHIVE_PUSH_LOG
#include "share/ob_errno.h"
#include "share/ob_ls_id.h"
namespace oceanbase
@ -949,7 +951,12 @@ void ObArchiveFetcher::handle_log_fetch_ret_(
// handle ret with retry
} else {
if (OB_ERR_OUT_OF_LOWER_BOUND == ret_code) {
reason.set(ObArchiveInterruptReason::Factor::LOG_RECYCLE, lbt(), ret_code);
int tmp_ret = OB_CLOG_RECYCLE_BEFORE_ARCHIVE;
reason.set(ObArchiveInterruptReason::Factor::LOG_RECYCLE, lbt(), tmp_ret);
LOG_DBA_ERROR(OB_CLOG_RECYCLE_BEFORE_ARCHIVE, "msg", "observer clog is recycled "
"before archive, check if archive speed is less than clog writing speed "
"or archive device is full or archive device is not healthy",
"ret", tmp_ret);
} else {
reason.set(ObArchiveInterruptReason::Factor::UNKONWN, lbt(), ret_code);
}