implement delete tenant_id dir's .tmp.seq files
This commit is contained in:
parent
7e8290f3f9
commit
d324e6dd53
@ -421,10 +421,10 @@ int FileDirectoryUtils::delete_directory_rec(const char *path)
|
||||
if (NULL == (dir = opendir(path))) {
|
||||
if (ENOENT != errno) {
|
||||
ret = OB_FILE_NOT_OPENED;
|
||||
LIB_LOG(WARN, "fail to open dir", K(ret), K(path));
|
||||
LIB_LOG(WARN, "fail to open dir", K(ret), K(path), K(errno), KERRMSG);
|
||||
} else {
|
||||
ret = OB_ENTRY_NOT_EXIST;
|
||||
LIB_LOG(WARN, "dir does not exist", K(ret), K(path));
|
||||
LIB_LOG(WARN, "dir does not exist", K(ret), K(path), K(errno), KERRMSG);
|
||||
}
|
||||
} else {
|
||||
char current_file_path[OB_MAX_FILE_NAME_LENGTH] = {'\0'};
|
||||
@ -466,7 +466,7 @@ int FileDirectoryUtils::delete_tmp_file_or_directory_at(const char *path)
|
||||
struct dirent *entry = nullptr;
|
||||
if (NULL == (dir = opendir(path))) {
|
||||
ret = OB_ERR_SYS;
|
||||
LIB_LOG(WARN, "opendir failed", K(path));
|
||||
LIB_LOG(WARN, "opendir failed", K(path), K(errno), KERRMSG);
|
||||
} else {
|
||||
auto check_is_tmp_file = [](const char* file_name) -> bool {
|
||||
return NULL != strstr(file_name, ".tmp");
|
||||
|
@ -572,10 +572,10 @@ int ObZoneStorageManagerBase::alter_storage_authorization(const ObBackupDest &st
|
||||
if (ObZoneStorageState::ADDED != zone_storage_infos_.at(i).state_ &&
|
||||
ObZoneStorageState::CHANGED != zone_storage_infos_.at(i).state_) {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
LOG_WARN("cannot support current storage state for changing", KR(ret),
|
||||
LOG_WARN("cannot support changing current storage state when undergoing modification", KR(ret),
|
||||
K(zone_storage_infos_.at(i)), K(i));
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED,
|
||||
"cannot support current storage state for changing, it is");
|
||||
"cannot support changing current storage state when undergoing modification, it is");
|
||||
} else if (OB_FAIL(target_storage_dest.set(zone_storage_infos_.at(i).dest_attr_.path_,
|
||||
storage_dest.get_storage_info()))) {
|
||||
LOG_WARN("failed to set storage dest", KR(ret), K(storage_dest),
|
||||
@ -654,10 +654,10 @@ int ObZoneStorageManagerBase::alter_storage_attribute(const ObString &storage_pa
|
||||
if (ObZoneStorageState::ADDED != zone_storage_infos_.at(i).state_ &&
|
||||
ObZoneStorageState::CHANGED != zone_storage_infos_.at(i).state_) {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
LOG_WARN("cannot support current storage state for changing", KR(ret),
|
||||
LOG_WARN("cannot support changing current storage state when undergoing modification", KR(ret),
|
||||
K(zone_storage_infos_.at(i)), K(i));
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED,
|
||||
"cannot support current storage state for changing, it is");
|
||||
"cannot support changing current storage state when undergoing modification, it is");
|
||||
} else if (OB_FAIL(target_storage_dest.set(zone_storage_infos_.at(i).dest_attr_.path_,
|
||||
zone_storage_infos_.at(i).dest_attr_.endpoint_,
|
||||
zone_storage_infos_.at(i).dest_attr_.authorization_,
|
||||
|
@ -936,7 +936,7 @@ int ObDelFilesOp::clean_batch_files()
|
||||
&& (OB_SUCCESS != tmp_ret || !failed_files_idx.empty()));
|
||||
|
||||
if (OB_SUCCESS == tmp_ret && !failed_files_idx.empty()) {
|
||||
ret = OB_UTL_FILE_DELETE_FAILED;
|
||||
ret = OB_FILE_DELETE_FAILED;
|
||||
}
|
||||
ret = COVER_SUCC(tmp_ret);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -2331,6 +2331,7 @@ DEFINE_ERROR_DEP(OB_ALLOCATE_TMP_FILE_PAGE_FAILED, -9124, -1, "HY000", "fail to
|
||||
DEFINE_ERROR_DEP(OB_SS_MICRO_CACHE_DISABLED, -9125, -1, "HY000", "ss_micro_cache is disabled");
|
||||
DEFINE_ERROR_DEP(OB_SS_CACHE_REACH_MEM_LIMIT, -9126, -1, "HY000", "ss_micro_cache has reached memory limit");
|
||||
DEFINE_ERROR(OB_TABLET_STATUS_NO_NEED_TO_SPLIT, -9127, -1, "HY000", "no need to split due to current tablet status");
|
||||
DEFINE_ERROR(OB_FILE_DELETE_FAILED, -9128, -1, "HY000", "fail to delete file");
|
||||
|
||||
// 余留位置,在该行之前继续添加storage错误码
|
||||
|
||||
|
@ -1589,6 +1589,7 @@ constexpr int OB_DIRECT_LOAD_COMMIT_ERROR = -9104;
|
||||
constexpr int OB_STORAGE_DEST_NOT_CONNECT = -9115;
|
||||
constexpr int OB_TABLET_IS_SPLIT_SRC = -9123;
|
||||
constexpr int OB_TABLET_STATUS_NO_NEED_TO_SPLIT = -9127;
|
||||
constexpr int OB_FILE_DELETE_FAILED = -9128;
|
||||
constexpr int OB_ERR_RESIZE_FILE_TO_SMALLER = -9200;
|
||||
constexpr int OB_MARK_BLOCK_INFO_TIMEOUT = -9201;
|
||||
constexpr int OB_NOT_READY_TO_EXTEND_FILE = -9202;
|
||||
@ -3914,6 +3915,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_SS_MICRO_CACHE_DISABLED__USER_ERROR_MSG "ss_micro_cache is disabled"
|
||||
#define OB_SS_CACHE_REACH_MEM_LIMIT__USER_ERROR_MSG "ss_micro_cache has reached memory limit"
|
||||
#define OB_TABLET_STATUS_NO_NEED_TO_SPLIT__USER_ERROR_MSG "no need to split due to current tablet status"
|
||||
#define OB_FILE_DELETE_FAILED__USER_ERROR_MSG "fail to delete file"
|
||||
#define OB_ERR_RESIZE_FILE_TO_SMALLER__USER_ERROR_MSG "Extend ssblock file to smaller is not allowed"
|
||||
#define OB_MARK_BLOCK_INFO_TIMEOUT__USER_ERROR_MSG "Mark blocks timeout(5s) in auto extend process when alloc block fail"
|
||||
#define OB_NOT_READY_TO_EXTEND_FILE__USER_ERROR_MSG "Auto extend param is not ready to start extending file"
|
||||
@ -8244,6 +8246,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_SS_CACHE_REACH_MEM_LIMIT__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9126, ss_micro_cache has reached memory limit"
|
||||
#define OB_TABLET_STATUS_NO_NEED_TO_SPLIT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9127, no need to split due to current tablet status"
|
||||
#define OB_TABLET_STATUS_NO_NEED_TO_SPLIT__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9127, no need to split due to current tablet status"
|
||||
#define OB_FILE_DELETE_FAILED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9128, fail to delete file"
|
||||
#define OB_FILE_DELETE_FAILED__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9128, fail to delete file"
|
||||
#define OB_ERR_RESIZE_FILE_TO_SMALLER__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9200, Extend ssblock file to smaller is not allowed"
|
||||
#define OB_ERR_RESIZE_FILE_TO_SMALLER__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9200, Extend ssblock file to smaller is not allowed"
|
||||
#define OB_MARK_BLOCK_INFO_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9201, Mark blocks timeout(5s) in auto extend process when alloc block fail"
|
||||
@ -9033,7 +9037,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[2359];
|
||||
extern int g_all_ob_errnos[2360];
|
||||
|
||||
const char *ob_error_name(const int oberr);
|
||||
const char* ob_error_cause(const int oberr);
|
||||
|
@ -366,10 +366,10 @@ int ObIODeviceLocalFileOp::scan_dir(const char *dir_name, int (*func)(const dire
|
||||
} else if (OB_ISNULL(open_dir = ::opendir(dir_name))) {
|
||||
if (ENOENT != errno) {
|
||||
ret = OB_FILE_NOT_OPENED;
|
||||
SHARE_LOG(WARN, "Fail to open dir, ", K(ret), K(dir_name));
|
||||
SHARE_LOG(WARN, "fail to open dir", K(ret), K(dir_name), K(errno), KERRMSG);
|
||||
} else {
|
||||
ret = OB_NO_SUCH_FILE_OR_DIRECTORY;
|
||||
SHARE_LOG(WARN, "dir does not exist", K(ret), K(dir_name));
|
||||
SHARE_LOG(WARN, "dir does not exist", K(ret), K(dir_name), K(errno), KERRMSG);
|
||||
}
|
||||
} else {
|
||||
while (OB_SUCC(ret) && NULL != open_dir) {
|
||||
@ -415,10 +415,10 @@ int ObIODeviceLocalFileOp::scan_dir(const char *dir_name, common::ObBaseDirEntry
|
||||
} else if (OB_ISNULL(open_dir = ::opendir(dir_name))) {
|
||||
if (ENOENT != errno) {
|
||||
ret = OB_FILE_NOT_OPENED;
|
||||
SHARE_LOG(WARN, "Fail to open dir, ", K(ret), K(dir_name));
|
||||
SHARE_LOG(WARN, "fail to open dir", K(ret), K(dir_name), K(errno), KERRMSG);
|
||||
} else {
|
||||
ret = OB_NO_SUCH_FILE_OR_DIRECTORY;
|
||||
SHARE_LOG(WARN, "dir does not exist", K(ret), K(dir_name));
|
||||
SHARE_LOG(WARN, "dir does not exist", K(ret), K(dir_name), K(errno), KERRMSG);
|
||||
}
|
||||
} else {
|
||||
while (OB_SUCC(ret) && NULL != open_dir) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user