convert OB_BACKUP_FILE_NOT_EXIST to OB_OBJECT_NOT_EXIST, and delete OB_BACKUP_FILE_NOT_EXIST

This commit is contained in:
obdev 2024-09-18 06:12:02 +00:00 committed by ob-robot
parent 7ff38fbdbf
commit 808598e82b
8 changed files with 11 additions and 31 deletions

View File

@ -388,7 +388,6 @@ constexpr int OB_INIT_MD5_ERROR = -9004;
constexpr int OB_OUT_OF_ELEMENT = -9005;
constexpr int OB_UPDATE_MD5_ERROR = -9006;
constexpr int OB_FILE_LENGTH_INVALID = -9007;
constexpr int OB_BACKUP_FILE_NOT_EXIST = -9011;
constexpr int OB_INVALID_BACKUP_DEST = -9026;
constexpr int OB_COS_ERROR = -9060;
constexpr int OB_IO_LIMIT = -9061;

View File

@ -1966,9 +1966,9 @@ int ObLogRawPathPieceContext::get_ls_piece_info(const int64_t curr_index, bool &
} else if (OB_FAIL(archive_store.init(dest))) {
CLOG_LOG(WARN, "archive store init failed", K(ret), K_(id));
} else if (OB_FAIL(archive_store.read_single_ls_info(ls_id, desc))
&& OB_BACKUP_FILE_NOT_EXIST != ret) {
&& OB_OBJECT_NOT_EXIST != ret) {
CLOG_LOG(WARN, "get single piece file failed", K(ret), K_(id));
} else if (OB_BACKUP_FILE_NOT_EXIST == ret) {
} else if (OB_OBJECT_NOT_EXIST == ret) {
exist = false;
ret = OB_SUCCESS;
CLOG_LOG(INFO, "ls not exist in cur piece", K_(id));
@ -2074,9 +2074,9 @@ int ObLogRawPathPieceContext::get_max_archive_log_(const ObLogRawPathPieceContex
} else if (OB_FAIL(archive_store.init(dest))) {
CLOG_LOG(WARN, "fail to init archive store", K(ret), K_(id));
} else if (OB_FAIL(archive_store.read_single_ls_info(id_, ls_info_desc))
&& OB_BACKUP_FILE_NOT_EXIST != ret) {
&& OB_OBJECT_NOT_EXIST != ret) {
CLOG_LOG(WARN, "get single ls info failed", K(ret), K_(id));
} else if (OB_BACKUP_FILE_NOT_EXIST == ret) { // active piece
} else if (OB_OBJECT_NOT_EXIST == ret) { // active piece
CLOG_LOG(WARN, "ls not exist in cur piece", K_(id));
ret = get_max_log_in_file_(origin, max_file_id_, archive_lsn, archive_scn);
} else if (OB_UNLIKELY(!ls_info_desc.is_valid())) {

View File

@ -736,7 +736,7 @@ int ObRestoreUtil::get_restore_scn_from_multi_path_(
}
}
} else if (OB_FAIL(get_backup_set_info_from_multi_path_(multi_path, backup_set_info))) { //read backup set info
if (OB_BACKUP_FILE_NOT_EXIST == ret) {
if (OB_OBJECT_NOT_EXIST == ret) {
ret = OB_SUCCESS;
LOG_INFO("ignore non backup set dir");
} else {
@ -859,7 +859,7 @@ int ObRestoreUtil::get_restore_backup_set_array_from_multi_path_(
} else if (OB_FAIL(store.init(backup_dest))) {
LOG_WARN("failed to init backup store", K(ret));
} else if (OB_FAIL(store.read_backup_set_info(backup_set_info))) { //check if backup set
if (OB_BACKUP_FILE_NOT_EXIST == ret) {
if (OB_OBJECT_NOT_EXIST == ret) {
ret = OB_SUCCESS;
LOG_INFO("skip log dir", K(ret), K(backup_dest));
continue;

View File

@ -1354,12 +1354,12 @@ int ObArchiveStore::get_single_piece_info(bool &is_empty_piece, ObSinglePieceDes
LOG_WARN("ObArchiveStore not init", K(ret));
} else if (OB_FAIL(read_single_piece(single_piece))) {
// not a frozen piece, build single piece info with extend and checkpoint info.
if (OB_BACKUP_FILE_NOT_EXIST == ret) {
if (OB_OBJECT_NOT_EXIST == ret) {
ObPieceCheckpointDesc checkpoint_desc;
ObTenantArchivePieceInfosDesc extend_desc;
ret = OB_SUCCESS;
if (OB_FAIL(read_piece_checkpoint(checkpoint_desc))) {
if (OB_BACKUP_FILE_NOT_EXIST == ret) {
if (OB_OBJECT_NOT_EXIST == ret) {
ret = OB_SUCCESS;
is_empty_piece = true;
} else {

File diff suppressed because one or more lines are too long

View File

@ -2202,7 +2202,6 @@ DEFINE_ERROR_DEP(OB_FILE_LENGTH_INVALID, -9007, -1, "HY000", "Invalid OSS file l
DEFINE_ERROR(OB_NOT_READ_ALL_DATA, -9008, -1, "HY000", "Read all data fail");
DEFINE_ERROR(OB_BUILD_MD5_ERROR, -9009, -1, "HY000", "Build MD5 fail");
DEFINE_ERROR(OB_MD5_NOT_MATCH, -9010, -1, "HY000", "OSS file MD5 not match");
DEFINE_ERROR_DEP(OB_BACKUP_FILE_NOT_EXIST, -9011, -1, "HY000", "cannot find backup file");
DEFINE_ERROR(OB_OSS_DATA_VERSION_NOT_MATCHED, -9012, -1, "HY000", "Can not get data version from timestamp");
DEFINE_ERROR(OB_OSS_WRITE_ERROR, -9013, -1, "HY000", "Write OSS file error");
DEFINE_ERROR(OB_RESTORE_IN_PROGRESS, -9014, -1, "HY000", "Another restore is in progress");

View File

@ -3779,7 +3779,6 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_NOT_READ_ALL_DATA__USER_ERROR_MSG "Read all data fail"
#define OB_BUILD_MD5_ERROR__USER_ERROR_MSG "Build MD5 fail"
#define OB_MD5_NOT_MATCH__USER_ERROR_MSG "OSS file MD5 not match"
#define OB_BACKUP_FILE_NOT_EXIST__USER_ERROR_MSG "cannot find backup file"
#define OB_OSS_DATA_VERSION_NOT_MATCHED__USER_ERROR_MSG "Can not get data version from timestamp"
#define OB_OSS_WRITE_ERROR__USER_ERROR_MSG "Write OSS file error"
#define OB_RESTORE_IN_PROGRESS__USER_ERROR_MSG "Another restore is in progress"
@ -7974,8 +7973,6 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_BUILD_MD5_ERROR__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9009, Build MD5 fail"
#define OB_MD5_NOT_MATCH__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9010, OSS file MD5 not match"
#define OB_MD5_NOT_MATCH__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9010, OSS file MD5 not match"
#define OB_BACKUP_FILE_NOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9011, cannot find backup file"
#define OB_BACKUP_FILE_NOT_EXIST__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9011, cannot find backup file"
#define OB_OSS_DATA_VERSION_NOT_MATCHED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9012, Can not get data version from timestamp"
#define OB_OSS_DATA_VERSION_NOT_MATCHED__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9012, Can not get data version from timestamp"
#define OB_OSS_WRITE_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9013, Write OSS file error"
@ -8949,7 +8946,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-01861: Incorrect datetime value for column '%.*s' at row %ld"
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__OBE_USER_ERROR_MSG "OBE-01861: Incorrect datetime value for column '%.*s' at row %ld"
extern int g_all_ob_errnos[2338];
extern int g_all_ob_errnos[2337];
const char *ob_error_name(const int oberr);
const char* ob_error_cause(const int oberr);

View File

@ -1032,7 +1032,7 @@ int ObBackupDataStore::get_single_backup_set_sys_time_zone_wrap(common::ObTimeZo
if (OB_FAIL(read_tenant_locality_info(locality_info))) {
LOG_WARN("fail to read backup set info", K(ret), K_(backup_set_dest));
} else if (OB_FAIL(read_backup_set_info(backup_set_info))) {
if (OB_BACKUP_FILE_NOT_EXIST == ret) {
if (OB_OBJECT_NOT_EXIST == ret) {
LOG_WARN("backup set info not exist", K(ret), K_(backup_set_dest));
ret = OB_SUCCESS;
} else {