Add DBA_ERROR if archive encounter fatal error
This commit is contained in:
@ -382,7 +382,12 @@ int ObLSMetaFileHeader::generate_header(const share::SCN ×tamp, const int64
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *reason_str[] = {"UNKONWN", "SEND_ERROR", "LOG_RECYCLE", "NOT_CONTINUOUS", "GC", "MAX"};
|
||||
const char *reason_str[] = {"UNKONWN",
|
||||
"SEND LOG TO ARCHIVE_DEST ERROR",
|
||||
"OBSERVER CLOG RECYCLED BEFORE ARCHIVED",
|
||||
"INTERNAL ERROR, ARCHIVE LOG NOT CONTINUOUS",
|
||||
"LS GC BEFORE ALL CLOG ARCHIVED",
|
||||
"MAX"};
|
||||
const char *ObArchiveInterruptReason::get_str() const
|
||||
{
|
||||
const char *str = NULL;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -743,6 +743,13 @@ void ObArchiveSender::handle_archive_ret_code_(const ObLSID &id,
|
||||
// skip it
|
||||
} else if (! in_normal_status_(key)) {
|
||||
// skip it
|
||||
} else if (OB_BACKUP_DEVICE_OUT_OF_SPACE == ret_code) {
|
||||
// ret code should report to user
|
||||
if (REACH_TIME_INTERVAL(10 * 1000 * 1000L)) {
|
||||
LOG_DBA_ERROR(OB_BACKUP_DEVICE_OUT_OF_SPACE, "msg", "archive device is full", "ret", ret_code,
|
||||
"archive_dest_id", key.dest_id_,
|
||||
"archive_round", key.round_);
|
||||
}
|
||||
} else if (is_ignore_ret_code_(ret_code)) {
|
||||
} else {
|
||||
ARCHIVE_LOG(ERROR, "archive sender encounter fatal error", K(ret), K(id), K(key), K(ret_code));
|
||||
|
File diff suppressed because one or more lines are too long
@ -1944,6 +1944,7 @@ DEFINE_ERROR_DEP(OB_BACKUP_PWRITE_CONTENT_NOT_MATCH, -9084, -1, "HY000", "the co
|
||||
|
||||
DEFINE_ERROR(OB_BACKUP_MAJOR_NOT_COVER_MINOR, -9085, -1, "HY000", "backup major sstable range not cover minor sstable");
|
||||
DEFINE_ERROR(OB_BACKUP_ADVANCE_CHECKPOINT_TIMEOUT, -9086, -1, "HY000", "backup advance checkpoint by flush timeout");
|
||||
DEFINE_ERROR(OB_CLOG_RECYCLE_BEFORE_ARCHIVE, -9087, -1, "HY000", "observer clog is recycled before archive");
|
||||
|
||||
|
||||
DEFINE_ERROR(OB_ESI_SESSION_NOT_EXIST, -9090, -1, "HY000", "obesi process session not exist");
|
||||
|
@ -1431,6 +1431,7 @@ constexpr int OB_BACKUP_FORMAT_FILE_NOT_EXIST = -9080;
|
||||
constexpr int OB_BACKUP_FORMAT_FILE_NOT_MATCH = -9081;
|
||||
constexpr int OB_BACKUP_MAJOR_NOT_COVER_MINOR = -9085;
|
||||
constexpr int OB_BACKUP_ADVANCE_CHECKPOINT_TIMEOUT = -9086;
|
||||
constexpr int OB_CLOG_RECYCLE_BEFORE_ARCHIVE = -9087;
|
||||
constexpr int OB_ESI_SESSION_NOT_EXIST = -9090;
|
||||
constexpr int OB_ALREADY_IN_ARCHIVE_MODE = -9091;
|
||||
constexpr int OB_ALREADY_IN_NOARCHIVE_MODE = -9092;
|
||||
@ -3455,6 +3456,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_BACKUP_PWRITE_CONTENT_NOT_MATCH__USER_ERROR_MSG "the contents of pwrite are inconsistent"
|
||||
#define OB_BACKUP_MAJOR_NOT_COVER_MINOR__USER_ERROR_MSG "backup major sstable range not cover minor sstable"
|
||||
#define OB_BACKUP_ADVANCE_CHECKPOINT_TIMEOUT__USER_ERROR_MSG "backup advance checkpoint by flush timeout"
|
||||
#define OB_CLOG_RECYCLE_BEFORE_ARCHIVE__USER_ERROR_MSG "observer clog is recycled before archive"
|
||||
#define OB_ESI_SESSION_NOT_EXIST__USER_ERROR_MSG "obesi process session not exist"
|
||||
#define OB_ALREADY_IN_ARCHIVE_MODE__USER_ERROR_MSG "Already in ARCHIVELOG mode"
|
||||
#define OB_ALREADY_IN_NOARCHIVE_MODE__USER_ERROR_MSG "Already in NOARCHIVELOG mode"
|
||||
@ -5480,6 +5482,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_BACKUP_PWRITE_CONTENT_NOT_MATCH__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9084, the contents of pwrite are inconsistent"
|
||||
#define OB_BACKUP_MAJOR_NOT_COVER_MINOR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9085, backup major sstable range not cover minor sstable"
|
||||
#define OB_BACKUP_ADVANCE_CHECKPOINT_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9086, backup advance checkpoint by flush timeout"
|
||||
#define OB_CLOG_RECYCLE_BEFORE_ARCHIVE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9087, observer clog is recycled before archive"
|
||||
#define OB_ESI_SESSION_NOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9090, obesi process session not exist"
|
||||
#define OB_ALREADY_IN_ARCHIVE_MODE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9091, Already in ARCHIVELOG mode"
|
||||
#define OB_ALREADY_IN_NOARCHIVE_MODE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9092, Already in NOARCHIVELOG mode"
|
||||
@ -5743,7 +5746,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-12899: value too large for column %.*s (actual: %ld, maximum: %ld)"
|
||||
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-01861: Incorrect datetime value for column '%.*s' at row %ld"
|
||||
|
||||
extern int g_all_ob_errnos[2020];
|
||||
extern int g_all_ob_errnos[2022];
|
||||
|
||||
const char *ob_error_name(const int oberr);
|
||||
const char* ob_error_cause(const int oberr);
|
||||
|
Reference in New Issue
Block a user