diff --git a/deps/oblib/src/lib/ob_errno.h b/deps/oblib/src/lib/ob_errno.h index e65b55b06..dd89cf976 100644 --- a/deps/oblib/src/lib/ob_errno.h +++ b/deps/oblib/src/lib/ob_errno.h @@ -424,6 +424,9 @@ constexpr int OB_S2_ENTRY_NOT_EXIST = -9122; constexpr int OB_ALLOCATE_TMP_FILE_PAGE_FAILED = -9124; constexpr int OB_SS_MICRO_CACHE_DISABLED = -9125; constexpr int OB_SS_CACHE_REACH_MEM_LIMIT = -9126; +constexpr int OB_OBJECT_STORAGE_IO_ERROR = -9129; +constexpr int OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH = -9130; +constexpr int OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH = -9131; constexpr int OB_ERR_XML_PARSE = -9549; constexpr int OB_ERR_XSLT_PARSE = -9574; constexpr int OB_HDFS_CONNECT_FS_ERROR = -11019; diff --git a/deps/oblib/src/lib/restore/cos/ob_cos_wrapper.cpp b/deps/oblib/src/lib/restore/cos/ob_cos_wrapper.cpp index def5d811b..e70845379 100644 --- a/deps/oblib/src/lib/restore/cos/ob_cos_wrapper.cpp +++ b/deps/oblib/src/lib/restore/cos/ob_cos_wrapper.cpp @@ -84,11 +84,11 @@ static int64_t ob_strtotime(const char *date_time) static void convert_io_error(cos_status_t *cos_ret, int &ob_errcode) { if (NULL == cos_ret) { - ob_errcode = OB_COS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } else if (!cos_status_is_ok(cos_ret)) { switch (cos_ret->code) { case COS_PERMISSION_DENIED: { - ob_errcode = OB_BACKUP_PERMISSION_DENIED; + ob_errcode = OB_OBJECT_STORAGE_PERMISSION_DENIED; break; } case COS_OBJECT_NOT_EXIST: { @@ -101,7 +101,7 @@ static void convert_io_error(cos_status_t *cos_ret, int &ob_errcode) break; } case COS_APPEND_POSITION_ERROR: { - ob_errcode = OB_BACKUP_PWRITE_OFFSET_NOT_MATCH; + ob_errcode = OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; break; } case COS_SERVICE_UNAVAILABLE: { @@ -110,7 +110,7 @@ static void convert_io_error(cos_status_t *cos_ret, int &ob_errcode) } case COS_BAD_REQUEST: { if (nullptr == cos_ret->error_code) { - ob_errcode = OB_COS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } else if (0 == strcmp("InvalidDigest", cos_ret->error_code)) { ob_errcode = OB_CHECKSUM_ERROR; } else if (0 == strcmp("InvalidRegionName", cos_ret->error_code)) { @@ -122,12 +122,12 @@ static void convert_io_error(cos_status_t *cos_ret, int &ob_errcode) || 0 == strcmp("InvalidArgument", cos_ret->error_code)) { ob_errcode = OB_INVALID_ARGUMENT; } else { - ob_errcode = OB_COS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } break; } default: { - ob_errcode = OB_COS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; break; } } @@ -174,7 +174,7 @@ int ob_set_retry_headers( ret = OB_INVALID_ARGUMENT; cos_warn_log("[COS]apr pool is null, ret=%d, headers=%p\n", ret, headers); } else if (OB_ISNULL(origin_headers = apr_table_clone(p, headers))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to deep copy headers, ret=%d, p=%p, headers=%p\n", ret, p, headers); } else { @@ -476,7 +476,7 @@ int ObCosAccount::parse_from(const char *storage_info, uint32_t size) } if (OB_SUCCESS == ret && bitmap != 0x0F) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to parse cos account storage_info=%p, bitmap=%x, ret=%d\n", storage_info, bitmap, ret); } } @@ -495,13 +495,13 @@ int ObCosEnv::init(apr_abortfunc_t abort_fn) ret = OB_INIT_TWICE; cos_warn_log("[COS]cannot init cos env more than once, ret=%d\n", ret); } else if (COSE_OK != (cos_ret = cos_http_io_initialize(NULL, 0))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to init cos env, cos_ret=%d, ret=%d\n", cos_ret, ret); } else { int apr_ret = APR_SUCCESS; if (APR_SUCCESS != (apr_ret = apr_allocator_create(&COS_GLOBAL_APR_ALLOCATOR)) || nullptr == COS_GLOBAL_APR_ALLOCATOR) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to create global apr allocator, ret=%d, apr_ret=%d, allocator=%p\n", ret, apr_ret, COS_GLOBAL_APR_ALLOCATOR); } else if (APR_SUCCESS != (apr_ret = apr_pool_create_ex(&COS_GLOBAL_APR_POOL, @@ -511,13 +511,13 @@ int ObCosEnv::init(apr_abortfunc_t abort_fn) abort_fn, COS_GLOBAL_APR_ALLOCATOR)) || nullptr == COS_GLOBAL_APR_POOL) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to create apr pool, ret=%d, apr_ret=%d, apr_pool=%p\n", ret, apr_ret, COS_GLOBAL_APR_POOL); } else if (APR_SUCCESS != (apr_ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, COS_GLOBAL_APR_POOL)) || nullptr == mutex) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to create apr thread mutex, ret=%d, apr_ret=%d, mutex=%p\n", ret, apr_ret, mutex); } else { @@ -814,7 +814,7 @@ int ObCosWrapper::append( // If the option is disabled, the MD5 checksum will not be calculated. int tmp_ret = cos_add_content_md5_from_buffer(ctx->options, &buffer, headers); if (COSE_OK != tmp_ret) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to add content md5, ret=%d, tmp_ret=%d\n", ret, tmp_ret); // append interface, do not retry } else if (nullptr == (cos_ret = cos_append_object_from_buffer(ctx->options, &bucket, &object, @@ -887,7 +887,7 @@ int ObCosWrapper::head_object_meta( } else if (0 == strncmp(COS_OBJECT_TYPE_NORMAL, object_type, strlen(COS_OBJECT_TYPE_NORMAL))) { meta.type_ = CosObjectMeta::CosObjectType::COS_OBJ_NORMAL; } else { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]unknown cos object type, ret=%d.\n", ret); } } @@ -899,14 +899,14 @@ int ObCosWrapper::head_object_meta( // enhance verification // not a valid file length, start with a non-digit character if (0 == isdigit(*file_length_ptr)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]not a valid file length, something wrong unexpected, ret=%d, file_length_ptr=%s.\n", ret, file_length_ptr); } else { char *end; meta.file_length_ = strtoll(file_length_ptr, &end, 10); // not a valid file length, end with a non-digit character if (0 != *end) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]not a valid file length, something wrong unexpected, ret=%d, file_length_ptr=%s.\n", ret, file_length_ptr); } } @@ -917,7 +917,7 @@ int ObCosWrapper::head_object_meta( } else if (NULL != (last_modified_ptr = (char*)apr_table_get(resp_headers, COS_LAST_MODIFIED))) { meta.last_modified_ts_ = ob_strtotime(last_modified_ptr); } else { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to get last modified from apr table, something wrong unexpected, ret=%d.\n", ret); } } @@ -1034,7 +1034,7 @@ int ObCosWrapper::batch_del( cos_object_key_t *object_key = nullptr; cos_list_for_each_entry(cos_object_key_t, object_key, &deleted_object_list, node) { if (nullptr == object_key->key.data || 0 >= object_key->key.len) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object key is null, ret=%d, key=%p, key_len=%ld\n", ret, object_key->key.data, object_key->key.len); log_status(cos_ret, ret); @@ -1177,10 +1177,10 @@ int ObCosWrapper::del_objects_in_dir( // Check if the prefix of returned object key match the dir_name size_t dir_name_str_len = dir_name.get_safe_str_len(); if (NULL == content->key.data) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object key data is null, dir=%s, ret=%d\n", dir_name.data_, ret); } else if (0 != memcmp(content->key.data, dir_name.data_, dir_name_str_len)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object prefix not match, dir=%s, object=%s, ret=%d\n", dir_name.data_, content->key.data, ret); } else if (NULL == (to_delete_object = cos_create_cos_object_key(ctx->mem_pool))) { ret = OB_ALLOCATE_MEMORY_FAILED; @@ -1219,13 +1219,13 @@ int ObCosWrapper::del_objects_in_dir( char *next_marker_str = NULL; if (OB_SUCCESS == ret && COS_TRUE == params->truncated) { if (nullptr == params->next_marker.data || params->next_marker.len == 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned next marker is invalid, data=%s, len=%d, ret=%d\n", params->next_marker.data, params->next_marker.len, ret); } else if (NULL == (next_marker_str = apr_psprintf(ctx->mem_pool, "%.*s", params->next_marker.len, params->next_marker.data))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]get next marker is null, ret=%d\n", ret); } else { cos_str_set(¶ms->marker, next_marker_str); @@ -1387,12 +1387,12 @@ int ObCosWrapper::pread( needed_size = buf_size - buf_pos; } if (is_range_read && (buf_pos + size > buf_size)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]unexpected error, too much data returned, ret=%d, range_size=%s, buf_pos=%ld, size=%ld, req_id=%s.\n", ret, range_size, buf_pos, size, cos_ret->req_id); log_status(cos_ret, ret); break; } else if (NULL == content->pos) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]unexpected error, data pos is null, ret=%d, range_size=%s, buf_pos=%ld, size=%ld, req_id=%s.\n", ret, range_size, buf_pos, size, cos_ret->req_id); log_status(cos_ret, ret); break; @@ -1632,10 +1632,10 @@ int ObCosWrapper::list_objects( // check if the prefix of returned object key match the full_dir_path size_t full_dir_path_len = full_dir_path.get_safe_str_len(); if (nullptr == content->key.data || 0 == content->key.len) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object key is invalid, dir=%s, requestid=%s, ret=%d\n", full_dir_path.data_, request_id, ret); } else if (false == full_dir_path.is_prefix_of(content->key.data, content->key.len)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object prefix not match, dir=%s, object=%s, requestid=%s, ret=%d\n", full_dir_path.data_, content->key.data, request_id, ret); } else if (content->key.len == full_dir_path_len) { @@ -1660,13 +1660,13 @@ int ObCosWrapper::list_objects( if (OB_SUCCESS == ret && COS_TRUE == params->truncated) { if (nullptr == params->next_marker.data || params->next_marker.len == 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned next marker is invalid, data=%s, len=%d, ret=%d\n", params->next_marker.data, params->next_marker.len, ret); } else if (nullptr == (cos_list_args.next_marker_ = apr_psprintf(ctx->mem_pool, "%.*s", params->next_marker.len, params->next_marker.data))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]get next marker is null, ret=%d\n", ret); } } @@ -1714,11 +1714,11 @@ int ObCosWrapper::list_part_objects( // check if the prefix of returned object key match the full_dir_path size_t full_dir_path_len = full_dir_path.get_safe_str_len(); if (nullptr == content->key.data || content->key.len <= 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object key is invalid, dir=%s, requestid=%s, ret=%d\n", full_dir_path.data_, request_id, ret); } else if (false == full_dir_path.is_prefix_of(content->key.data, content->key.len)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object prefix not match, dir=%s, object=%s, requestid=%s, ret=%d\n", full_dir_path.data_, content->key.data, request_id, ret); } else if (content->key.len == full_dir_path_len) { @@ -1810,14 +1810,14 @@ int ObCosWrapper::list_directories( // check if the prefix of returned object key match the dir_name const size_t dir_name_str_len = dir_name.get_safe_str_len(); if (nullptr == listed_dir_full_path || listed_dir_full_path_len <= 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned dirs is invalid, dir=%s, requestid=%s, ret=%d\n", dir_name.data_, request_id, ret); } else if (false == dir_name.is_prefix_of(listed_dir_full_path, listed_dir_full_path_len)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned object prefix not match, dir=%s, object=%s, requestid=%s, ret=%d, obj_path_len=%d, dir_name_len=%d\n", dir_name.data_, listed_dir_full_path, request_id, ret, listed_dir_full_path_len, dir_name.size_); } else if (seperator != listed_dir_full_path[listed_dir_full_path_len - 1]) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]the data has no directory, dir=%s, object=%s, requestid=%s, ret=%d obj_len=%d\n", dir_name.data_, listed_dir_full_path, request_id, ret, listed_dir_full_path_len); } else { @@ -1840,13 +1840,13 @@ int ObCosWrapper::list_directories( if (OB_SUCCESS == ret && COS_TRUE == params->truncated) { if (nullptr == params->next_marker.data || params->next_marker.len == 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned next marker is invalid, data=%s, len=%d, ret=%d\n", params->next_marker.data, params->next_marker.len, ret); } else if (nullptr == (cos_list_args.next_marker_ = apr_psprintf(ctx->mem_pool, "%.*s", params->next_marker.len, params->next_marker.data))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]get next marker is null, ret=%d\n", ret); } } @@ -1915,15 +1915,15 @@ int ObCosWrapper::add_part_info( cos_warn_log("[COS]partnum is invalid, ret=%d, partnum=%d, max_limit=%ld\n", ret, partnum, MAX_COS_PART_NUM); } else if (nullptr == (complete_part_content = cos_create_complete_part_content(ctx->mem_pool))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to create complete part content, ret=%d, pool=%p\n", ret, ctx->mem_pool); } else if (nullptr == (partnum_str = apr_psprintf(ctx->mem_pool, "%d", partnum))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to construct partnum_str, ret=%d, pool=%p, partnum=%d\n", ret, ctx->mem_pool, partnum); } else if (nullptr == (etag_str = apr_pstrdup(ctx->mem_pool, etag_header_str))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to construct etag_str, ret=%d, pool=%p, etag=%s\n", ret, ctx->mem_pool, etag_header_str); } else { @@ -1954,7 +1954,7 @@ int ObCosWrapper::init_multipart_upload( ret = OB_INVALID_ARGUMENT; cos_warn_log("[COS]object name is null, ret=%d\n", ret); } else if (nullptr == (complete_part_list = apr_palloc(ctx->mem_pool, sizeof(cos_list_t)))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]fail to alloc buf for complete_part_list, ret=%d, pool=%p\n", ret, ctx->mem_pool); } else { @@ -2053,7 +2053,7 @@ int ObCosWrapper::upload_part_from_buffer( } else { etag_header_str = apr_table_get(resp_headers, "ETag"); if (nullptr == etag_header_str) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned etag is null, ret=%d\n", ret); } } @@ -2222,7 +2222,7 @@ int ObCosWrapper::del_unmerged_parts( char *request_id = (char*)apr_table_get(resp_headers, "x-cos-request-id"); cos_list_for_each_entry(cos_list_multipart_upload_content_t, content, ¶ms->upload_list, node) { if (nullptr == content->key.data || nullptr == content->upload_id.data) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned key or upload id is invalid, dir=%s, requestid=%s, ret=%d, key=%s, upload id=%s\n", object_name.data_, request_id, ret, content->key.data, content->upload_id.data); } else if (nullptr == (cos_ret = cos_abort_multipart_upload(ctx->options, &bucket, @@ -2249,19 +2249,19 @@ int ObCosWrapper::del_unmerged_parts( if (OB_SUCCESS == ret && COS_TRUE == params->truncated) { if (nullptr == params->next_key_marker.data || nullptr == params->next_upload_id_marker.data || params->next_key_marker.len == 0 || params->next_upload_id_marker.len == 0) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]returned key marker or upload id is invalid, key data=%s, key len=%d, upload id data=%s, upload id len=%d, ret=%d\n", params->next_key_marker.data, params->next_key_marker.len, params->next_upload_id_marker.data, params->next_upload_id_marker.len, ret); } else if (nullptr == (next_key_marker = apr_psprintf(ctx->mem_pool, "%.*s", params->next_key_marker.len, params->next_key_marker.data))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]get next key marker is null, ret=%d\n", ret); } else if (NULL == (next_upload_id_marker = apr_psprintf(ctx->mem_pool, "%.*s", params->next_upload_id_marker.len, params->next_upload_id_marker.data))) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; cos_warn_log("[COS]get next upload id marker is null, ret=%d\n", ret); } else { cos_str_set(¶ms->key_marker, next_key_marker); diff --git a/deps/oblib/src/lib/restore/cos/ob_cos_wrapper_handle.cpp b/deps/oblib/src/lib/restore/cos/ob_cos_wrapper_handle.cpp index e4e57fc06..cd937d7a7 100644 --- a/deps/oblib/src/lib/restore/cos/ob_cos_wrapper_handle.cpp +++ b/deps/oblib/src/lib/restore/cos/ob_cos_wrapper_handle.cpp @@ -115,7 +115,7 @@ int create_cos_handle( check_md5, &handle))) { OB_LOG(WARN, "failed to create tmp cos handle", K(ret)); } else if (OB_ISNULL(handle)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "create tmp handle succeed, but returned handle is null", K(ret)); } @@ -152,7 +152,7 @@ int ObCosWrapperHandle::create_tmp_cos_handle( check_md5, &handle))) { OB_LOG(WARN, "failed to create tmp cos handle", K(ret)); } else if (OB_ISNULL(handle)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "create tmp handle succeed, but returned handle is null", K(ret)); } diff --git a/deps/oblib/src/lib/restore/ob_storage.cpp b/deps/oblib/src/lib/restore/ob_storage.cpp index 7db733a1a..8af2fa903 100644 --- a/deps/oblib/src/lib/restore/ob_storage.cpp +++ b/deps/oblib/src/lib/restore/ob_storage.cpp @@ -110,7 +110,7 @@ bool is_object_storage_type(const ObStorageType &type) } bool is_io_error(const int result) { - return OB_IO_ERROR == result || OB_OSS_ERROR == result || OB_COS_ERROR == result || OB_S3_ERROR == result; + return OB_IO_ERROR == result || OB_OBJECT_STORAGE_IO_ERROR == result; } int get_storage_type_from_name(const char *type_str, ObStorageType &type) @@ -2545,7 +2545,7 @@ int ObStorageAppender::repeatable_pwrite_(const char *buf, const int64_t size, c } else if (reader.get_length() <= offset) { // This situation also has concurrency issues. // The length read by the reader may be old, so offset not match needs to be returned for retry. - ret = OB_BACKUP_PWRITE_OFFSET_NOT_MATCH; + ret = OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; STORAGE_LOG(WARN, "offset is invalid", K(offset), "length", reader.get_length(), K(ret)); } else if (OB_FALSE_IT(actual_write_offset = reader.get_length() - offset)) { } else if (OB_FALSE_IT(read_buf_size = std::min(actual_write_offset, size))) { @@ -2555,11 +2555,11 @@ int ObStorageAppender::repeatable_pwrite_(const char *buf, const int64_t size, c } else if (OB_FAIL(reader.pread(read_buffer, read_buf_size, offset, read_size))) { STORAGE_LOG(WARN, "failed to pread", K(ret)); } else if (0 != MEMCMP(buf, read_buffer, read_buf_size)) { - ret = OB_BACKUP_PWRITE_CONTENT_NOT_MATCH; + ret = OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH; STORAGE_LOG(WARN, "data inconsistent", K(ret)); } else if (offset + size > reader.get_length()) { if (OB_FAIL(appender_->pwrite(buf + actual_write_offset, size - actual_write_offset, reader.get_length()))) { - if (OB_BACKUP_PWRITE_OFFSET_NOT_MATCH == ret) { + if (OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH == ret) { ret = OB_IO_ERROR; STORAGE_LOG(WARN, "There may be concurrency problems that require the caller to retry", K(ret)); } @@ -2594,8 +2594,8 @@ int ObStorageAppender::pwrite(const char *buf, const int64_t size, const int64_t } // no need to adjust the function repeatable_pwrite_ - // because S3 will not return OB_BACKUP_PWRITE_OFFSET_NOT_MATCH - if (OB_BACKUP_PWRITE_OFFSET_NOT_MATCH == ret && appender_ != &s3_appender_) { + // because S3 will not return OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH + if (OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH == ret && appender_ != &s3_appender_) { if (OB_FAIL(repeatable_pwrite_(buf, size, offset))) { STORAGE_LOG(WARN, "failed to repeatable_pwrite", K(ret)); } else { diff --git a/deps/oblib/src/lib/restore/ob_storage_cos_base.cpp b/deps/oblib/src/lib/restore/ob_storage_cos_base.cpp index 723949f41..b53685d9f 100644 --- a/deps/oblib/src/lib/restore/ob_storage_cos_base.cpp +++ b/deps/oblib/src/lib/restore/ob_storage_cos_base.cpp @@ -200,7 +200,7 @@ int ObStorageCosUtil::open(ObObjectStorageInfo *storage_info) { int ret = OB_SUCCESS; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util already open, cannot open again", K(ret)); } else if (OB_ISNULL(storage_info)) { ret = OB_INVALID_ARGUMENT; @@ -252,7 +252,7 @@ int ObStorageCosUtil::head_object_meta(const ObString &uri, ObStorageObjectMetaB int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -329,7 +329,7 @@ int ObStorageCosUtil::is_tagging( is_tagging = false; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -352,7 +352,7 @@ int ObStorageCosUtil::del_file(const ObString &uri) ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -380,7 +380,7 @@ int ObStorageCosUtil::batch_del_files( ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -409,7 +409,7 @@ int ObStorageCosUtil::list_files( ObArenaAllocator allocator(ObModIds::BACKUP); if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -446,7 +446,7 @@ int ObStorageCosUtil::list_files( ObStorageListObjectsCtx &list_ctx = static_cast(ctx_base); if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty() || !list_ctx.is_valid())) { ret = OB_INVALID_ARGUMENT; @@ -483,7 +483,7 @@ int ObStorageCosUtil::list_directories( ObArenaAllocator allocator(ObModIds::BACKUP); if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -517,7 +517,7 @@ int ObStorageCosUtil::del_unmerged_parts(const ObString &uri) ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -720,7 +720,7 @@ int ObStorageCosBase::delete_objects( // By comparing it to files_to_delete, we can identify the objects that failed to be deleted. for (int64_t i = 0; OB_SUCC(ret) && i < n_succeed_deleted_objects; i++) { if (OB_ISNULL(succeed_deleted_objects_list[i])) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object key is null", K(ret), K(i), K(n_succeed_deleted_objects), K(n_files_to_delete)); } @@ -878,7 +878,7 @@ int ObStorageCosReader::open(const ObString &uri, ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos reader already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageCosBase::open(uri, storage_info))) { OB_LOG(WARN, "fail to open in cos_base", K(ret), K(uri)); @@ -923,7 +923,7 @@ int ObStorageCosReader::pread( ObExternalIOCounterGuard io_guard; if (!is_opened_) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos reader cannot read before it is opened", K(ret)); } else if (OB_ISNULL(buf) || OB_UNLIKELY(buf_size <= 0 || offset < 0)) { ret = OB_INVALID_ARGUMENT; @@ -1009,7 +1009,7 @@ int ObStorageCosWriter::open( { int ret = OB_SUCCESS; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos writer already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageCosBase::open(uri, storage_info))) { OB_LOG(WARN, "fail to open in cos_base", K(ret), K(uri)); @@ -1082,7 +1082,7 @@ int ObStorageCosAppendWriter::open( ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos appender already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageCosBase::open(uri, storage_info))) { OB_LOG(WARN, "fail to open in cos_base", K(ret), K(uri)); @@ -1110,7 +1110,7 @@ int ObStorageCosAppendWriter::pwrite(const char *buf, const int64_t size, const const bool is_pwrite = true; if(OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos append writer cannot write before it is not opened", K(ret)); } else if(NULL == buf || size <= 0 || offset < 0) { ret = OB_INVALID_ARGUMENT; @@ -1164,7 +1164,7 @@ int ObStorageCosAppendWriter::do_write( ret = OB_CLOUD_OBJECT_NOT_APPENDABLE; OB_LOG(WARN, "we can only append an appendable obj", K(ret), K(is_appendable)); } else if (is_pwrite && pos != offset) { - ret = OB_BACKUP_PWRITE_OFFSET_NOT_MATCH; + ret = OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; OB_LOG(WARN, "offset is not match with real length", K(ret), K(pos), K(offset), K(obj_meta.type_)); } else if (OB_FAIL(qcloud_cos::ObCosWrapper::append(handle_.get_ptr(), bucket_name, object_name, buf, size, offset))) { @@ -1230,7 +1230,7 @@ int ObStorageCosMultiPartWriter::open(const ObString &uri, common::ObObjectStora int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -1275,7 +1275,7 @@ int ObStorageCosMultiPartWriter::write(const char * buf, const int64_t size) int64_t fill_size = 0; int64_t buf_pos = 0; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "write cos should open first", K(ret)); } else if (OB_ISNULL(buf) || OB_UNLIKELY(size < 0)) { ret = OB_INVALID_ARGUMENT; @@ -1322,7 +1322,7 @@ int ObStorageCosMultiPartWriter::write_single_part() ret = OB_OUT_OF_ELEMENT; OB_LOG(WARN, "Out of cos element ", K(ret), K_(partnum)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "write cos should open first", K(ret)); } else { qcloud_cos::CosStringBuffer bucket_name = qcloud_cos::CosStringBuffer( @@ -1382,7 +1382,7 @@ int ObStorageCosMultiPartWriter::complete() ObExternalIOCounterGuard io_guard; const int64_t start_time = ObTimeUtility::current_time(); if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos multipart writer cannot close before it is opened", K(ret)); } else if (0 != base_buf_pos_) { if (OB_FAIL(write_single_part())) { @@ -1432,7 +1432,7 @@ int ObStorageCosMultiPartWriter::abort() { int ret = OB_SUCCESS; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos multipart writer cannot abort before it is opened", K(ret)); } else { qcloud_cos::CosStringBuffer bucket_name = qcloud_cos::CosStringBuffer( @@ -1482,7 +1482,7 @@ int ObStorageParallelCosMultiPartWriter::open(const ObString &uri, ObObjectStora ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_FAIL(ObStorageCosBase::open(uri, storage_info))) { OB_LOG(WARN, "fail to open in cos_base", K(ret), K(uri), KPC(storage_info)); @@ -1524,7 +1524,7 @@ int ObStorageParallelCosMultiPartWriter::upload_part( const char *etag_header_str = nullptr; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "write cos should open first", K(ret)); } else if (OB_UNLIKELY(part_id < 1 || part_id > COS_MAX_PART_NUM)) { ret = OB_INVALID_ARGUMENT; @@ -1562,7 +1562,7 @@ int ObStorageParallelCosMultiPartWriter::complete() ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos multipart writer cannot close before it is opened", K(ret)); } else if (FAILEDx(construct_complete_part_list(handle_.get_ptr(), part_info_map_, @@ -1590,7 +1590,7 @@ int ObStorageParallelCosMultiPartWriter::abort() int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_COS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "cos multipart writer cannot abort before it is opened", K(ret)); } else { if (OB_FAIL(qcloud_cos::ObCosWrapper::abort_multipart_upload( diff --git a/deps/oblib/src/lib/restore/ob_storage_file.cpp b/deps/oblib/src/lib/restore/ob_storage_file.cpp index 0623d4f36..794750e42 100644 --- a/deps/oblib/src/lib/restore/ob_storage_file.cpp +++ b/deps/oblib/src/lib/restore/ob_storage_file.cpp @@ -32,7 +32,7 @@ static void convert_io_error(const int sys_err, int &ob_error_code) if (ENOENT == sys_err) { ob_error_code = OB_OBJECT_NOT_EXIST; } else if (EPERM == sys_err || EACCES == sys_err) { - ob_error_code = OB_BACKUP_PERMISSION_DENIED; + ob_error_code = OB_OBJECT_STORAGE_PERMISSION_DENIED; } else if (ENOSPC == sys_err || EDQUOT == sys_err) { ob_error_code = OB_BACKUP_DEVICE_OUT_OF_SPACE; } else if (ENAMETOOLONG == sys_err) { diff --git a/deps/oblib/src/lib/restore/ob_storage_oss_base.cpp b/deps/oblib/src/lib/restore/ob_storage_oss_base.cpp index 879959fd2..eae50d6d8 100644 --- a/deps/oblib/src/lib/restore/ob_storage_oss_base.cpp +++ b/deps/oblib/src/lib/restore/ob_storage_oss_base.cpp @@ -182,11 +182,11 @@ int inner_get_bucket_object_name(const ObString &uri, ObString &bucket, ObString static void convert_io_error(aos_status_t *aos_ret, int &ob_errcode) { if (OB_ISNULL(aos_ret)) { - ob_errcode = OB_OSS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } else if (!aos_status_is_ok(aos_ret)) { switch (aos_ret->code) { case OSS_PERMISSION_DENIED: { - ob_errcode = OB_BACKUP_PERMISSION_DENIED; + ob_errcode = OB_OBJECT_STORAGE_PERMISSION_DENIED; break; } @@ -201,7 +201,7 @@ static void convert_io_error(aos_status_t *aos_ret, int &ob_errcode) } case OSS_OBJECT_PWRITE_OFFSET_NOT_MATH: { - ob_errcode = OB_BACKUP_PWRITE_OFFSET_NOT_MATCH; + ob_errcode = OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; break; } @@ -212,7 +212,7 @@ static void convert_io_error(aos_status_t *aos_ret, int &ob_errcode) case OSS_BAD_REQUEST: { if (OB_ISNULL(aos_ret->error_code)) { - ob_errcode = OB_OSS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } else if (0 == STRCMP("InvalidDigest", aos_ret->error_code)) { ob_errcode = OB_CHECKSUM_ERROR; } else if (0 == STRCMP("InvalidBucketName", aos_ret->error_code)) { @@ -223,14 +223,14 @@ static void convert_io_error(aos_status_t *aos_ret, int &ob_errcode) else if (0 == STRCMP("InvalidObjectName", aos_ret->error_code)) { ob_errcode = OB_INVALID_ARGUMENT; } else { - ob_errcode = OB_OSS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } break; } default: { if (OB_ISNULL(aos_ret->error_code)) { - ob_errcode = OB_OSS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } else if (0 == STRCMP("BucketNameInvalidError", aos_ret->error_code)) { ob_errcode = OB_INVALID_OBJECT_STORAGE_ENDPOINT; } @@ -240,7 +240,7 @@ static void convert_io_error(aos_status_t *aos_ret, int &ob_errcode) && OB_NOT_NULL(STRSTR(aos_ret->error_msg, "invalid argument"))) { ob_errcode = OB_INVALID_ARGUMENT; } else { - ob_errcode = OB_OSS_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } break; } @@ -481,13 +481,13 @@ int ObOssEnvIniter::global_init() ret = OB_INIT_TWICE; OB_LOG(WARN, "cannot init twice", K(ret)); } else if (AOSE_OK != (aos_ret = aos_http_io_initialize(NULL, 0))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to init aos", K(aos_ret)); } else { int apr_ret = APR_SUCCESS; if (APR_SUCCESS != (apr_ret = apr_allocator_create(&OSS_GLOBAL_APR_ALLOCATOR)) || OB_ISNULL(OSS_GLOBAL_APR_ALLOCATOR)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create global apr allocator", K(ret), K(apr_ret), KP(OSS_GLOBAL_APR_ALLOCATOR)); } else if (APR_SUCCESS != (apr_ret = apr_pool_create_ex(&OSS_GLOBAL_APR_POOL, @@ -495,12 +495,12 @@ int ObOssEnvIniter::global_init() ob_apr_abort_fn, OSS_GLOBAL_APR_ALLOCATOR)) || OB_ISNULL(OSS_GLOBAL_APR_POOL)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create global apr pool", K(ret), K(apr_ret), KP(OSS_GLOBAL_APR_POOL)); } else if (APR_SUCCESS != (apr_ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, OSS_GLOBAL_APR_POOL)) || OB_ISNULL(mutex)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create apr thread mutex", K(ret), K(apr_ret), KP(mutex)); } else { apr_allocator_max_free_set(OSS_GLOBAL_APR_ALLOCATOR, MAX_OSS_APR_HOLD_SIZE); @@ -750,24 +750,24 @@ int ObStorageOssBase::init_oss_options(aos_pool_t *&aos_pool, oss_request_option int ret = OB_SUCCESS; int apr_ret = APR_SUCCESS; if (APR_SUCCESS != (apr_ret = aos_pool_create(&aos_pool, OSS_GLOBAL_APR_POOL)) || OB_ISNULL(aos_pool)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create apr pool", K(apr_ret), K(aos_pool), K(ret)); } else if (OB_ISNULL(oss_option = oss_request_options_create(aos_pool))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to init option ", K(oss_option), K(ret)); } else if (OB_ISNULL(oss_option->config = oss_config_create(oss_option->pool))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create oss config", K(ret)); } else if (OB_FAIL(init_oss_endpoint())) { OB_LOG(WARN, "fail to init oss endpoind", K(ret)); } else if (OB_ISNULL(oss_option->ctl = aos_http_controller_create(oss_option->pool, 0))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create aos http controller", K(ret)); // A separate instance of ctl->options is now allocated for each request, // ensuring that disabling CRC checks is a request-specific action // and does not impact the global setting for OSS request options. } else if (OB_ISNULL(oss_option->ctl->options = aos_http_request_options_create(oss_option->pool))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create aos http request options", K(ret)); } else { aos_str_set(&oss_option->config->endpoint, oss_endpoint_); @@ -823,7 +823,7 @@ int ObStorageOssBase::init_oss_endpoint() { int ret = OB_SUCCESS; if (0 == strlen(oss_account_.oss_domain_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss domain is empty", K(ret)); } else { int64_t str_len = strlen(oss_account_.oss_domain_); @@ -890,14 +890,14 @@ int ObStorageOssBase::get_oss_file_meta(const ObString &bucket_ob_string, remote_md5 = (char*)apr_table_get(resp_headers, OSS_META_MD5); //get file length if (OB_ISNULL(file_length_ptr = (char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to get file length string from response", K(ret)); } else if (OB_FAIL(ob_atoll(file_length_ptr, file_length))) { OB_LOG(WARN, "fail to convert string to int64", K(ret), K(file_length_ptr), K(file_length)); } if (OB_SUCC(ret) && file_length < 0) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to get object length", K(bucket_ob_string), K(object_ob_string), K(file_length), K(ret)); } } @@ -970,7 +970,7 @@ int ObStorageOssMultiPartWriter::open(const ObString &uri, common::ObObjectStora ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "uri is empty", K(ret), K(uri)); } else if (is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_FAIL(init_with_storage_info(storage_info))) { OB_LOG(WARN, "failed to init oss", K(ret)); @@ -998,7 +998,7 @@ int ObStorageOssMultiPartWriter::open(const ObString &uri, common::ObObjectStora OB_LOG(WARN, "oss init multipart upload error", K(uri), K(ret)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_ISNULL(upload_id_.data) || OB_UNLIKELY(upload_id_.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "upload id is invalid", K(ret), KP(upload_id_.data), K(upload_id_.len)); } else { is_opened_ = true; @@ -1022,7 +1022,7 @@ int ObStorageOssMultiPartWriter::write(const char * buf,const int64_t size) ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "buf is NULL or size is invalid", KP(buf), K(size), K(ret)); } else if (!is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss writer cannot write before it is opened", K(ret)); } @@ -1111,10 +1111,10 @@ static int construct_complete_part_list( ret = OB_ERR_UNEXPECTED; OB_LOG(WARN, "etag is null", K(ret), K(i), K(max_part_id)); } else if (OB_ISNULL(complete_part_content = oss_create_complete_part_content(pool))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create complete part content", K(ret), KP(pool), K(i), K(max_part_id)); } else if (OB_ISNULL(partnum_str = apr_psprintf(pool, "%ld", i))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to construct partnum_str", K(ret), KP(pool), K(i), K(max_part_id)); } else { aos_str_set(&complete_part_content->part_number, partnum_str); @@ -1139,7 +1139,7 @@ int ObStorageOssMultiPartWriter::write_single_part() ret = OB_NOT_INIT; OB_LOG(WARN, "please init first", K(ret)); } else if (!is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "write oss should open first", K(ret)); } @@ -1158,10 +1158,10 @@ int ObStorageOssMultiPartWriter::write_single_part() const int64_t start_time = ObTimeUtility::current_time(); if (OB_ISNULL(headers = aos_table_make(aos_pool_, AOS_TABLE_INIT_SIZE))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make apr table", K(ret)); } else if (OB_ISNULL(content = aos_buf_pack(aos_pool_, base_buf_, static_cast(base_buf_pos_)))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to pack buf", K(content), K(ret)); } else if ((checksum_type_ == ObStorageChecksumType::OB_MD5_ALGO) && OB_FAIL(add_content_md5(oss_option_, base_buf_, base_buf_pos_, headers))) { @@ -1185,7 +1185,7 @@ int ObStorageOssMultiPartWriter::write_single_part() K_(base_buf_pos), K_(bucket), K_(object), K(ret)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_ISNULL(etag_header_str = apr_table_get(resp_headers, "ETag"))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "etag is null", K(ret), K_(bucket), K_(object), K_(partnum)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_FAIL(add_part_info(partnum_, etag_header_str, nullptr/*checksum*/))) { @@ -1211,7 +1211,7 @@ int ObStorageOssMultiPartWriter::complete() ret = OB_NOT_INIT; OB_LOG(WARN, "oss client not inited", K(ret)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss multipart writer cannot close before it is opened", K(ret)); } else if (0 != base_buf_pos_) {//base_buf has data if (OB_FAIL(write_single_part())) { @@ -1287,7 +1287,7 @@ int ObStorageOssMultiPartWriter::abort() ret = OB_NOT_INIT; OB_LOG(WARN, "oss client not inited", K(ret)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss multipart writer cannot abort before it is opened", K(ret)); } else { aos_string_t bucket; @@ -1333,7 +1333,7 @@ int ObStorageParallelOssMultiPartWriter::open(const ObString &uri, ObObjectStora int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss multipart writer already opened, cannot open again", K(ret), K(uri)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -1361,7 +1361,7 @@ int ObStorageParallelOssMultiPartWriter::open(const ObString &uri, ObObjectStora OB_LOG(WARN, "oss init multipart upload error", K(uri), K(ret)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_ISNULL(upload_id_.data) || OB_UNLIKELY(upload_id_.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "upload id is invalid", K(ret), KP(upload_id_.data), K(upload_id_.len)); } else { is_opened_ = true; @@ -1383,7 +1383,7 @@ int ObStorageParallelOssMultiPartWriter::upload_part( ret = OB_NOT_INIT; OB_LOG(WARN, "oss client not inited", K(ret)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "multipart write oss should open first", K(ret)); } else if (OB_UNLIKELY(part_id < 1 || part_id > OSS_MAX_PART_NUM)) { ret = OB_INVALID_ARGUMENT; @@ -1413,10 +1413,10 @@ int ObStorageParallelOssMultiPartWriter::upload_part( const int64_t start_time = ObTimeUtility::current_time(); if (OB_ISNULL(headers = aos_table_make(tmp_aos_pool, AOS_TABLE_INIT_SIZE))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make apr table", K(ret), K_(bucket), K_(object)); } else if (OB_ISNULL(content = aos_buf_pack(tmp_aos_pool, buf, static_cast(size)))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to pack buf", K(size), K(ret), K_(bucket), K_(object)); } else if ((checksum_type_ == ObStorageChecksumType::OB_MD5_ALGO) && OB_FAIL(add_content_md5(tmp_oss_option, buf, size, headers))) { @@ -1441,7 +1441,7 @@ int ObStorageParallelOssMultiPartWriter::upload_part( K(ret), K(size), K_(bucket), K_(object)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_ISNULL(etag_header_str = apr_table_get(resp_headers, "ETag"))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "etag is null", K(ret), K_(bucket), K_(object), K(part_id)); print_oss_info(resp_headers, aos_ret, ret); } else if (OB_FAIL(add_part_info(part_id, etag_header_str, nullptr/*checksum*/))) { @@ -1473,7 +1473,7 @@ int ObStorageParallelOssMultiPartWriter::complete() ret = OB_NOT_INIT; OB_LOG(WARN, "oss client not inited", K(ret)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss multipart writer not opened", K(ret)); } else { aos_string_t bucket; @@ -1516,7 +1516,7 @@ int ObStorageParallelOssMultiPartWriter::abort() ret = OB_NOT_INIT; OB_LOG(WARN, "oss client not inited", K(ret)); } else if (OB_UNLIKELY(!is_opened_)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss multipart writer cannot abort before it is opened", K(ret)); } else { aos_string_t bucket; @@ -1582,7 +1582,7 @@ int ObStorageOssReader::open(const ObString &uri, ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "uri is empty", K(ret)); } else if (is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_FAIL(init_with_storage_info(storage_info))) { OB_LOG(WARN, "failed to init oss", K(ret)); @@ -1624,7 +1624,7 @@ int ObStorageOssReader::pread( ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "buf is NULL or buf_size is invalid", K(buf_size), K(ret), KP(buf), K(offset)); } else if (!is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss reader cannot read before it is opened", K(ret)); } else if (OB_FAIL(init_oss_options(tmp_aos_pool, tmp_oss_option))) { OB_LOG(WARN, "fail to init oss options", K(tmp_aos_pool), K(tmp_oss_option), K(ret)); @@ -1672,7 +1672,7 @@ int ObStorageOssReader::pread( char range_size[OSS_RANGE_SIZE]; if (OB_ISNULL(headers = aos_table_make(tmp_aos_pool, AOS_TABLE_INIT_SIZE))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make oss headers", K(ret)); } else { if (is_range_read) { @@ -1706,7 +1706,7 @@ int ObStorageOssReader::pread( // At this point, the actual size of the file could be larger than the determined file length at the time of opening. // Therefore, if it's not a range read, the data read could exceed the expected amount to be read if (is_range_read && len > get_data_size) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "get data size error, range header may be invalid", K(get_data_size), K(len), K_(bucket), K_(object), K(ret), K_(has_meta), K(offset)); @@ -1722,7 +1722,7 @@ int ObStorageOssReader::pread( OB_LOG(WARN, "the size is too long", K(buf_pos), K(size), K(get_data_size), K(ret)); break; } else if (OB_ISNULL(content->pos)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "unexpected error, the data pos is null", K(size), K(ret)); } else { memcpy(buf + buf_pos, content->pos, (size_t)needed_size); @@ -1781,7 +1781,7 @@ int ObStorageOssUtil::open(common::ObObjectStorageInfo *storage_info) { int ret = OB_SUCCESS; if (is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_ISNULL(storage_info)) { ret = OB_INVALID_ARGUMENT; @@ -1987,7 +1987,7 @@ int ObStorageOssUtil::tagging_object_( aos_str_set(&object, object_str.ptr()); aos_list_init(&tag_list); if (OB_ISNULL(tag_content = oss_create_tag_content(oss_base.aos_pool_))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "tag content is null", K(ret), K(uri)); } else { aos_str_set(&tag_content->key, "delete_mode"); @@ -2109,7 +2109,7 @@ int ObStorageOssUtil::batch_del_files( oss_object_key_t *object_key = nullptr; aos_list_for_each_entry(oss_object_key_t, object_key, &deleted_object_list, node) { if (OB_ISNULL(object_key->key.data) || OB_UNLIKELY(object_key->key.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object key is null", K(ret), KP(object_key->key.data), K(object_key->key.len), K(uri)); oss_base.print_oss_info(resp_headers, aos_ret, ret); @@ -2160,7 +2160,7 @@ int ObStorageOssUtil::do_list_(ObStorageOssBase &oss_base, } else { if (NULL == params) { if (OB_ISNULL(params = oss_create_list_object_params(oss_base.aos_pool_))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create list object params", K(ret), K(bucket_str), K(full_dir_path)); } } else { @@ -2244,7 +2244,7 @@ int ObStorageOssUtil::list_files( int64_t object_size = -1; if (OB_ISNULL(object_path) || OB_UNLIKELY(false == object_path.prefix_match(full_dir_path))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(object_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(object_path.length() == full_dir_path_len)) { @@ -2267,13 +2267,13 @@ int ObStorageOssUtil::list_files( } if (OB_SUCC(ret) && AOS_TRUE == params->truncated) { if (OB_ISNULL(params->next_marker.data) || OB_UNLIKELY(params->next_marker.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next_marker is invalid", K(ret), K(params->next_marker.data), K(params->next_marker.len)); } else if (nullptr == (next_marker = apr_psprintf(oss_base.aos_pool_, "%.*s", params->next_marker.len, params->next_marker.data))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next marker is NULL", K(ret), KP(next_marker), K(params->next_marker.data)); } } @@ -2338,7 +2338,7 @@ int ObStorageOssUtil::list_files( int64_t object_size = -1; if (OB_ISNULL(object_path) || OB_UNLIKELY(false == object_path.prefix_match(full_dir_path))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(object_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(object_path.length() == full_dir_path_len)) { @@ -2441,11 +2441,11 @@ int ObStorageOssUtil::list_directories( // and listed_dir_full_path == 'dir1/dir11/', which represents the full directory path of 'dir11' listed_dir_full_path.assign(common_prefix->prefix.data, common_prefix->prefix.len); if (OB_ISNULL(listed_dir_full_path) || OB_UNLIKELY(false == listed_dir_full_path.prefix_match(full_dir_path))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(listed_dir_full_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(!is_end_with_slash(listed_dir_full_path.ptr()))) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "the data has no directory", K(ret), K(full_dir_path), K(listed_dir_full_path), K(uri)); } else if (OB_FAIL(handle_listed_directory(op, @@ -2464,13 +2464,13 @@ int ObStorageOssUtil::list_directories( } if (OB_SUCC(ret) && AOS_TRUE == params->truncated) { if (OB_ISNULL(params->next_marker.data) || OB_UNLIKELY(params->next_marker.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next_marker is invalid", K(ret), K(params->next_marker.data), K(params->next_marker.len)); } else if (nullptr == (next_marker = apr_psprintf(oss_base.aos_pool_, "%.*s", params->next_marker.len, params->next_marker.data))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next marker is NULL", K(ret), KP(next_marker), K(params->next_marker.data)); } } @@ -2504,7 +2504,7 @@ int ObStorageOssUtil::del_unmerged_parts(const ObString &uri) } else if (OB_FAIL(get_bucket_object_name(uri, bucket_str, object_str, allocator))) { OB_LOG(WARN, "bucket or object name is empty", K(ret), K(uri), K(bucket_str), K(object_str)); } else if (OB_ISNULL(params = oss_create_list_multipart_upload_params(oss_base.aos_pool_))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to create list oss multipart upload params", K(ret), K(bucket_str)); } else { aos_str_set(¶ms->prefix, object_str.ptr()); @@ -2528,7 +2528,7 @@ int ObStorageOssUtil::del_unmerged_parts(const ObString &uri) } else { aos_list_for_each_entry(oss_list_multipart_upload_content_t, content, ¶ms->upload_list, node) { if (OB_ISNULL(content->key.data) || OB_ISNULL(content->upload_id.data)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned key or upload id invalid", K(ret), K(content->key.data), K(content->upload_id.data)); } else if (OB_ISNULL(aos_ret = oss_abort_multipart_upload(oss_base.oss_option_, &bucket, @@ -2555,7 +2555,7 @@ int ObStorageOssUtil::del_unmerged_parts(const ObString &uri) if (OB_SUCC(ret) && AOS_TRUE == params->truncated) { if (OB_ISNULL(params->next_key_marker.data) || OB_ISNULL(params->next_upload_id_marker.data) || OB_UNLIKELY(params->next_key_marker.len <= 0 || params->next_upload_id_marker.len <= 0)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next_key_marker or next_upload_id_marker is invalid", K(ret), K(params->next_key_marker.data), K(params->next_key_marker.len), K(params->next_upload_id_marker.data), K(params->next_upload_id_marker.len)); @@ -2563,13 +2563,13 @@ int ObStorageOssUtil::del_unmerged_parts(const ObString &uri) apr_psprintf(oss_base.aos_pool_, "%.*s", params->next_key_marker.len, params->next_key_marker.data))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next key marker is NULL", K(ret), KP(next_key_marker)); } else if (OB_ISNULL(next_upload_id_marker = apr_psprintf(oss_base.aos_pool_, "%.*s", params->next_upload_id_marker.len, params->next_upload_id_marker.data))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next upload id marker is NULL", K(ret), KP(next_upload_id_marker)); } else { aos_str_set(¶ms->key_marker, next_key_marker); @@ -2606,7 +2606,7 @@ int ObStorageOssAppendWriter::open( ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "uri is empty", K(ret), K(uri)); } else if (is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(init_with_storage_info(storage_info))) { OB_LOG(WARN, "failed to init oss", K(ret), K(uri)); @@ -2687,17 +2687,17 @@ int ObStorageOssAppendWriter::do_write(const char *buf, const int64_t size, cons aos_list_init(&buffer); int64_t position = 0; if (OB_ISNULL(headers1 = aos_table_make(aos_pool_, 0))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make apr table", K(ret)); } else if (OB_ISNULL(aos_ret = oss_head_object(oss_option_, &bucket, &object, headers1, &resp_headers))) { print_oss_info(resp_headers, aos_ret, ret); - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "oss head object fail", K(ret), K_(bucket), K_(object), K(aos_ret)); } else { if (0 != aos_status_is_ok(aos_ret)) { // != 0 means ok char *object_type = (char*)(apr_table_get(resp_headers, OSS_OBJECT_TYPE)); if (OB_ISNULL(object_type)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(ERROR, "oss type is null", K(ret)); } else if (0 != strncmp(OSS_OBJECT_TYPE_APPENDABLE, object_type, strlen(OSS_OBJECT_TYPE_APPENDABLE))) { ret = OB_CLOUD_OBJECT_NOT_APPENDABLE; @@ -2705,14 +2705,14 @@ int ObStorageOssAppendWriter::do_write(const char *buf, const int64_t size, cons } else { char *next_append_position = (char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION)); if (OB_ISNULL(next_append_position)) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "next_append_position is not found", K(ret), K_(bucket), K_(object)); } else if (OB_FAIL(c_str_to_int(next_append_position, position))) { OB_LOG(WARN, "fail to get position", K(ret), K(next_append_position), K_(object)); } else { if (0 > position) { ObString tmp_position_string(next_append_position); - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "invalid append position", K(ret), K(position), K(tmp_position_string)); } } @@ -2720,16 +2720,16 @@ int ObStorageOssAppendWriter::do_write(const char *buf, const int64_t size, cons } if (OB_SUCC(ret) && is_pwrite && position != offset) { - ret = OB_BACKUP_PWRITE_OFFSET_NOT_MATCH; + ret = OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; OB_LOG(WARN, "position and offset do not match", K(ret), K(position), K(offset)); } if (OB_SUCC(ret)) { if (OB_ISNULL(headers2 = aos_table_make(aos_pool_, AOS_TABLE_INIT_SIZE))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make apr table", K(ret)); } else if (OB_ISNULL(content = aos_buf_pack(aos_pool_, buf, static_cast(size)))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to pack buf", K(content), K(ret)); } else if ((checksum_type_ == ObStorageChecksumType::OB_MD5_ALGO) && OB_FAIL(add_content_md5(oss_option_, buf, size, headers2))) { @@ -2814,7 +2814,7 @@ int ObStorageOssWriter::open( ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "uri is empty", K(ret), K(uri)); } else if (is_opened_) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "already open, cannot open again", K(ret)); } else if (OB_FAIL(init_with_storage_info(storage_info))) { OB_LOG(WARN, "failed to init oss", K(ret), K(uri)); @@ -2871,10 +2871,10 @@ int ObStorageOssWriter::write(const char *buf, const int64_t size) aos_list_init(&buffer); if (OB_ISNULL(headers = aos_table_make(aos_pool_, AOS_TABLE_INIT_SIZE))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to make apr table", K(ret)); } else if (OB_ISNULL(content = aos_buf_pack(aos_pool_, buf, static_cast(size)))) { - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "fail to pack buf", K(content), K(ret)); } else if ((checksum_type_ == ObStorageChecksumType::OB_MD5_ALGO) && OB_FAIL(add_content_md5(oss_option_, buf, size, headers))) { diff --git a/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp b/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp index 107d52c57..e9c6656b2 100644 --- a/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp +++ b/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp @@ -113,7 +113,7 @@ void ObS3Logger::Log(Logging::LogLevel logLevel, const char* tag, const char* fo if (OB_NOT_NULL(STRSTR(arg_buf, "HTTP response code: 404"))) { // skip NO_SUCH_KEY error } else { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; _OB_LOG(WARN, new_format, tag, arg_buf); } break; @@ -248,11 +248,11 @@ int ObS3Client::init(const ObS3Account &account) client_ = new(client_buf) Aws::S3::S3Client(credentials, Aws::MakeShared(S3_SDK), config); } catch (const std::exception &e) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "caught exception when initing ObS3Client", K(ret), K(e.what()), KP(this), K(*this)); } catch (...) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "caught unknown exception when initing ObS3Client", K(ret), KP(this), K(*this)); } @@ -337,7 +337,7 @@ int ObS3Client::check_status() ret = OB_IN_STOP_STATE; OB_LOG(WARN, "ObS3Client has been stopped", K(ret)); } else if (OB_ISNULL(client_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "client is NULL in ObS3Client", K(ret), KP(client_)); } return ret; @@ -743,7 +743,7 @@ static void convert_http_error(const Aws::S3::S3Error &s3_err, int &ob_errcode) || err_msg.find("InvalidArgument") != std::string::npos) { ob_errcode = OB_INVALID_ARGUMENT; } else { - ob_errcode = OB_S3_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } break; } @@ -765,7 +765,7 @@ static void convert_http_error(const Aws::S3::S3Error &s3_err, int &ob_errcode) if (err_msg.find("curlCode: 28") != std::string::npos) { ob_errcode = OB_TIMEOUT; } else { - ob_errcode = OB_S3_ERROR; + ob_errcode = OB_OBJECT_STORAGE_IO_ERROR; } break; } @@ -788,7 +788,7 @@ static void convert_io_error(const Aws::S3::S3Error &s3_err, int &ob_errcode) break; } case Aws::S3::S3Errors::ACCESS_DENIED: { - ob_errcode = OB_BACKUP_PERMISSION_DENIED; + ob_errcode = OB_OBJECT_STORAGE_PERMISSION_DENIED; break; } case Aws::S3::S3Errors::NO_SUCH_BUCKET: { @@ -1321,7 +1321,7 @@ int ObStorageS3Writer::open_(const ObString &uri, ObObjectStorageInfo *storage_i { int ret = OB_SUCCESS; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 writer already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageS3Base::open(uri, storage_info))) { OB_LOG(WARN, "failed to open in s3 base", K(ret), K(uri)); @@ -1446,7 +1446,7 @@ int ObStorageS3Reader::open_(const ObString &uri, S3ObjectMeta meta; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 reader already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageS3Base::open(uri, storage_info))) { OB_LOG(WARN, "failed to open in s3 base", K(ret), K(uri)); @@ -1478,7 +1478,7 @@ int ObStorageS3Reader::pread_(char *buf, int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 reader not opened", K(ret)); } else if (OB_ISNULL(buf) || OB_UNLIKELY(buf_size <= 0 || offset < 0)) { ret = OB_INVALID_ARGUMENT; @@ -1557,7 +1557,7 @@ int ObStorageS3Util::open(ObObjectStorageInfo *storage_info) { int ret = OB_SUCCESS; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util already open, cannot open again", K(ret)); } else if (OB_ISNULL(storage_info)) { ret = OB_INVALID_ARGUMENT; @@ -1612,7 +1612,7 @@ int ObStorageS3Util::head_object_meta(const ObString &uri, ObStorageObjectMetaBa obj_meta.reset(); ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -1677,7 +1677,7 @@ int ObStorageS3Util::del_file_(const ObString &uri) ObStorageS3Base s3_base; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -1802,7 +1802,7 @@ int ObStorageS3Util::write_single_file_(const ObString &uri, const char *buf, co ObStorageS3Writer s3_writer; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty() || size < 0) || OB_ISNULL(buf)) { ret = OB_INVALID_ARGUMENT; @@ -1834,7 +1834,7 @@ int ObStorageS3Util::list_files_(const ObString &uri, ObBaseDirEntryOperator &op const char *full_dir_path = NULL; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -1865,7 +1865,7 @@ int ObStorageS3Util::list_files_(const ObString &uri, ObBaseDirEntryOperator &op // When list 'aaa/bbb/ccc/' this dir, we will get it self, that means we will get // a object whose name length is same with its parent dir length. if (OB_ISNULL(obj_path) || OB_UNLIKELY(false == ObString(obj_path).prefix_match(full_dir_path))) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(request_id), K(obj_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(obj_path_len == full_dir_path_len)) { @@ -1912,7 +1912,7 @@ int ObStorageS3Util::list_files2_( ObStorageListObjectsCtx &list_ctx = static_cast(ctx_base); if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty() || !list_ctx.is_valid())) { ret = OB_INVALID_ARGUMENT; @@ -1967,7 +1967,7 @@ int ObStorageS3Util::list_files2_( OB_LOG(DEBUG, "s3 list files content", K(cur_obj_path), K(cur_obj_path_len)); if (OB_ISNULL(cur_obj_path) || OB_UNLIKELY(false == ObString(cur_obj_path).prefix_match(full_dir_path))) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(request_id), K(cur_obj_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(cur_obj_path_len == full_dir_path_len)) { @@ -2001,7 +2001,7 @@ int ObStorageS3Util::list_directories_(const ObString &uri, ObBaseDirEntryOperat ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -2037,11 +2037,11 @@ int ObStorageS3Util::list_directories_(const ObString &uri, ObBaseDirEntryOperat OB_LOG(DEBUG, "s3 list directories", K(i), K(listed_dir_full_path)); if (OB_ISNULL(listed_dir_full_path) || OB_UNLIKELY(false == ObString(listed_dir_full_path).prefix_match(full_dir_path))) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned object prefix not match", K(ret), K(request_id), K(listed_dir_full_path), K(full_dir_path), K(uri)); } else if (OB_UNLIKELY(!is_end_with_slash(listed_dir_full_path))) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "the data has no directory", K(ret), K(request_id), K(full_dir_path), K(listed_dir_full_path), K(uri)); } else if (OB_FAIL(handle_listed_directory(op, @@ -2054,7 +2054,7 @@ int ObStorageS3Util::list_directories_(const ObString &uri, ObBaseDirEntryOperat if (OB_SUCC(ret) && outcome.GetResult().GetIsTruncated()) { next_marker = outcome.GetResult().GetNextMarker(); if (next_marker.empty()) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "when listing s3 directories, next marker should not be empty if result is truncated", K(ret), K(request_id), K(outcome.GetResult().GetIsTruncated()), K(next_marker.c_str())); } @@ -2072,7 +2072,7 @@ int ObStorageS3Util::is_tagging_(const ObString &uri, bool &is_tagging) ObExternalIOCounterGuard io_guard; is_tagging = false; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -2116,7 +2116,7 @@ int ObStorageS3Util::del_unmerged_parts_(const ObString &uri) ObStorageS3Base s3_base; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(!is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 util not opened", K(ret)); } else if (OB_UNLIKELY(uri.empty())) { ret = OB_INVALID_ARGUMENT; @@ -2184,7 +2184,7 @@ int ObStorageS3AppendWriter::open_(const ObString &uri, ObObjectStorageInfo *sto int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 append writer already open, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageS3Writer::open(uri, storage_info))) { OB_LOG(WARN, "failed to open in s3 base", K(ret), K(uri)); @@ -2295,7 +2295,7 @@ int ObStorageS3MultiPartWriter::open_(const ObString &uri, ObObjectStorageInfo * int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 multipart writer already opened, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageS3Writer::open(uri, storage_info))) { OB_LOG(WARN, "failed to open in s3 base", K(ret), K(uri)); @@ -2569,7 +2569,7 @@ int ObStorageParallelS3MultiPartWriter::open_(const ObString &uri, ObObjectStora int ret = OB_SUCCESS; ObExternalIOCounterGuard io_guard; if (OB_UNLIKELY(is_opened_)) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "s3 multipart writer already opened, cannot open again", K(ret), K(uri)); } else if (OB_FAIL(ObStorageS3Writer::open(uri, storage_info))) { OB_LOG(WARN, "failed to open in s3 base writer", K(ret), K(uri), KPC(storage_info)); @@ -2591,7 +2591,7 @@ int ObStorageParallelS3MultiPartWriter::open_(const ObString &uri, ObObjectStora } else { const Aws::String &upload_id = outcome.GetResult().GetUploadId(); if (OB_UNLIKELY(upload_id.empty())) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "returned upload_id is empty", K(ret), K(upload_id.size())); } else if (OB_ISNULL(upload_id_ = static_cast(allocator_.alloc(upload_id.size() + 1)))) { ret = OB_ALLOCATE_MEMORY_FAILED; diff --git a/deps/oblib/src/lib/restore/ob_storage_s3_base.h b/deps/oblib/src/lib/restore/ob_storage_s3_base.h index 37d00e689..eaa48b2d5 100644 --- a/deps/oblib/src/lib/restore/ob_storage_s3_base.h +++ b/deps/oblib/src/lib/restore/ob_storage_s3_base.h @@ -346,10 +346,10 @@ public: try { ret = std::mem_fn(f)(obj, std::forward(args)...); } catch (const std::exception &e) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "caught exception when doing s3 operation", K(ret), K(e.what()), KP(this)); } catch (...) { - ret = OB_S3_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; OB_LOG(WARN, "caught unknown exception when doing s3 operation", K(ret), KP(this)); } return ret; diff --git a/deps/oblib/unittest/lib/restore/test_object_storage.cpp b/deps/oblib/unittest/lib/restore/test_object_storage.cpp index 576a10d6d..95080500a 100644 --- a/deps/oblib/unittest/lib/restore/test_object_storage.cpp +++ b/deps/oblib/unittest/lib/restore/test_object_storage.cpp @@ -1445,11 +1445,11 @@ TEST_F(TestObjectStorage, test_del_unmerged_parts) ASSERT_EQ(OB_SUCCESS, util.del_unmerged_parts(uri)); if (info_base.get_type() == ObStorageType::OB_STORAGE_OSS) { - ASSERT_EQ(OB_OSS_ERROR, writer.close()); + ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, writer.close()); } else if (ObStorageType::OB_STORAGE_S3 == info_base.get_type()) { - ASSERT_EQ(OB_S3_ERROR, writer.close()); + ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, writer.close()); } else if (info_base.get_type() == ObStorageType::OB_STORAGE_COS) { - ASSERT_EQ(OB_COS_ERROR, writer.close()); + ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, writer.close()); } } diff --git a/deps/oblib/unittest/lib/restore/test_storage.cpp b/deps/oblib/unittest/lib/restore/test_storage.cpp index ed6dbc7b0..3dbda413b 100644 --- a/deps/oblib/unittest/lib/restore/test_storage.cpp +++ b/deps/oblib/unittest/lib/restore/test_storage.cpp @@ -81,7 +81,7 @@ TEST_F(TestStorageOss, test_repeatable_pwrite) ASSERT_EQ(4, appender.get_length()); const char *buf2 = "56"; - ASSERT_EQ(OB_BACKUP_PWRITE_CONTENT_NOT_MATCH, appender.pwrite(buf2, strlen(buf2), 5)); + ASSERT_EQ(OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH, appender.pwrite(buf2, strlen(buf2), 5)); ASSERT_EQ(4, appender.get_length()); const char *buf3 = "45"; @@ -101,7 +101,7 @@ TEST_F(TestStorageOss, test_repeatable_pwrite) ASSERT_EQ(7, appender.get_length()); const char *buf7 = "427"; - ASSERT_EQ(OB_BACKUP_PWRITE_CONTENT_NOT_MATCH, appender.pwrite(buf7, strlen(buf7), 4)); + ASSERT_EQ(OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH, appender.pwrite(buf7, strlen(buf7), 4)); ASSERT_EQ(7, appender.get_length()); ASSERT_EQ(OB_SUCCESS, appender.close()); diff --git a/deps/oblib/unittest/lib/restore/test_storage_cos.cpp b/deps/oblib/unittest/lib/restore/test_storage_cos.cpp index 06c01971b..69200d1d7 100644 --- a/deps/oblib/unittest/lib/restore/test_storage_cos.cpp +++ b/deps/oblib/unittest/lib/restore/test_storage_cos.cpp @@ -168,9 +168,9 @@ TEST_F(TestStorageCos, test_append) // second append const char second_write[] = "4567"; // repeatable_pwrite returned err code - ASSERT_EQ(OB_BACKUP_PWRITE_CONTENT_NOT_MATCH, + ASSERT_EQ(OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH, appender.pwrite(second_write, strlen(second_write), strlen(first_write) - 1)); - ASSERT_EQ(OB_BACKUP_PWRITE_OFFSET_NOT_MATCH, + ASSERT_EQ(OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH, appender.pwrite(second_write, strlen(second_write) - 1, strlen(first_write) + 1)); ASSERT_EQ(OB_SUCCESS, appender.pwrite(second_write, strlen(second_write), strlen(first_write))); ASSERT_EQ(strlen(first_write) + strlen(second_write), appender.get_length()); @@ -685,7 +685,7 @@ TEST_F(TestStorageCos, test_multipartupload) memset(content, 'a', content_size); // operate before open - ASSERT_EQ(OB_COS_ERROR, multi_upload.write(content, content_size)); + ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, multi_upload.write(content, content_size)); const int64_t ts = ObTimeUtility::current_time(); ASSERT_EQ(OB_SUCCESS, databuff_printf(dir_uri, sizeof(dir_uri), "%s/%s/%s_%ld", diff --git a/src/logservice/archiveservice/ob_archive_sender.cpp b/src/logservice/archiveservice/ob_archive_sender.cpp index a9561708e..c3f1622cd 100644 --- a/src/logservice/archiveservice/ob_archive_sender.cpp +++ b/src/logservice/archiveservice/ob_archive_sender.cpp @@ -786,10 +786,10 @@ void ObArchiveSender::handle_archive_ret_code_(const ObLSID &id, "archive_dest_id", key.dest_id_, "archive_round", key.round_); } - } else if (OB_BACKUP_PERMISSION_DENIED == ret_code) { + } else if (OB_OBJECT_STORAGE_PERMISSION_DENIED == ret_code) { // backup permission denied if (REACH_TIME_INTERVAL(ARCHIVE_DBA_ERROR_LOG_PRINT_INTERVAL)) { - LOG_DBA_ERROR(OB_BACKUP_PERMISSION_DENIED, "msg", "archive dest permission denied", "ret", ret_code, + LOG_DBA_ERROR(OB_OBJECT_STORAGE_PERMISSION_DENIED, "msg", "archive dest permission denied", "ret", ret_code, "archive_dest_id", key.dest_id_, "archive_round", key.round_); } @@ -829,9 +829,9 @@ bool ObArchiveSender::is_retry_ret_code_(const int ret_code) const return is_io_error(ret_code) || OB_ALLOCATE_MEMORY_FAILED == ret_code || OB_BACKUP_DEVICE_OUT_OF_SPACE == ret_code - || OB_BACKUP_PWRITE_OFFSET_NOT_MATCH == ret_code + || OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH == ret_code || OB_IO_LIMIT == ret_code - || OB_BACKUP_PERMISSION_DENIED == ret_code + || OB_OBJECT_STORAGE_PERMISSION_DENIED == ret_code || OB_ERR_AES_ENCRYPT == ret_code || OB_ERR_AES_DECRYPT == ret_code || OB_TIMEOUT == ret_code; diff --git a/src/logservice/ob_log_external_storage_handler.cpp b/src/logservice/ob_log_external_storage_handler.cpp index 1981d7dc9..125737f1f 100644 --- a/src/logservice/ob_log_external_storage_handler.cpp +++ b/src/logservice/ob_log_external_storage_handler.cpp @@ -395,15 +395,15 @@ int ObLogExternalStorageHandler::convert_ret_code_(const int ret_code) { int ret = ret_code; switch (ret_code) { - case OB_BACKUP_PERMISSION_DENIED: - case OB_BACKUP_PWRITE_OFFSET_NOT_MATCH: - ret = OB_OSS_ERROR; + case OB_OBJECT_STORAGE_PERMISSION_DENIED: + case OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH: + ret = OB_OBJECT_STORAGE_IO_ERROR; break; case OB_OBJECT_NOT_EXIST: ret = OB_NO_SUCH_FILE_OR_DIRECTORY; break; default: - ret = OB_OSS_ERROR; + ret = OB_OBJECT_STORAGE_IO_ERROR; } return ret; } diff --git a/src/logservice/ob_log_external_storage_handler.h b/src/logservice/ob_log_external_storage_handler.h index b7419c632..1481bcde3 100644 --- a/src/logservice/ob_log_external_storage_handler.h +++ b/src/logservice/ob_log_external_storage_handler.h @@ -95,9 +95,9 @@ public: // OB_SUCCESS, read successfully. // OB_INVALID_ARGUMENT, invalid argument. // OB_ALLOCATE_MEMORY_FAILED, allocate memory failed. - // OB_BACKUP_PERMISSION_DENIED, permission denied. + // OB_OBJECT_STORAGE_PERMISSION_DENIED, permission denied. // OB_OBJECT_NOT_EXIST, uri not exist. - // OB_OSS_ERROR, oss error. + // OB_OBJECT_STORAGE_IO_ERROR, oss error. // OB_FILE_LENGTH_INVALID, read offset is greater than file size. // OB_NOT_INIT // OB_NOT_RUNNING @@ -134,9 +134,9 @@ public: // OB_SUCCESS, read successfully. // OB_INVALID_ARGUMENT, invalid argument. // OB_ALLOCATE_MEMORY_FAILED, allocate memory failed. - // OB_BACKUP_PERMISSION_DENIED, permission denied. + // OB_OBJECT_STORAGE_PERMISSION_DENIED, permission denied. // OB_OBJECT_NOT_EXIST, uri not exist. - // OB_OSS_ERROR, oss error. + // OB_OBJECT_STORAGE_IO_ERROR, oss error. // OB_NOT_INIT // OB_NOT_RUNNING int upload(const uint64_t tenant_id, @@ -159,7 +159,7 @@ public: // OB_INVALID_ARGUMENT, invalid argument. // OB_ALLOCATE_MEMORY_FAILED, allocate memory failed. // OB_FILE_LENGTH_INVALID, read offset is greater than file size. - // OB_OSS_ERROR, oss error. + // OB_OBJECT_STORAGE_IO_ERROR, oss error. // OB_FILE_OR_DIRECTORY_NOT_EXIST, file not exist // OB_NOT_INIT // OB_NOT_RUNNING diff --git a/src/observer/table_load/backup/ob_table_load_backup_file_util.cpp b/src/observer/table_load/backup/ob_table_load_backup_file_util.cpp index 01845d459..7e947ec39 100644 --- a/src/observer/table_load/backup/ob_table_load_backup_file_util.cpp +++ b/src/observer/table_load/backup/ob_table_load_backup_file_util.cpp @@ -34,7 +34,7 @@ int ObTableLoadBackupFileUtil::list_directories(const common::ObString &path, while (OB_SUCC(ret)) { if (OB_FAIL(adapter.list_directories(path, storage_info, op))) { LOG_WARN("fail to list directories", K(ret), K(retry_count)); - if (ret == OB_OSS_ERROR) { + if (ret == OB_OBJECT_STORAGE_IO_ERROR) { retry_count++; if (retry_count <= MAX_RETRY_COUNT) { ret = OB_SUCCESS; @@ -59,7 +59,7 @@ int ObTableLoadBackupFileUtil::get_file_length(const common::ObString &path, while (OB_SUCC(ret)) { if (OB_FAIL(adapter.get_file_length(path, storage_info, file_length))) { LOG_WARN("fail to list directories", K(ret), K(retry_count)); - if (ret == OB_OSS_ERROR) { + if (ret == OB_OBJECT_STORAGE_IO_ERROR) { retry_count++; if (retry_count <= MAX_RETRY_COUNT) { ret = OB_SUCCESS; @@ -87,7 +87,7 @@ int ObTableLoadBackupFileUtil::read_single_file(const common::ObString &path, while (OB_SUCC(ret)) { if (OB_FAIL(adapter.read_single_file(path, storage_info, buf, buf_size, read_size, ObStorageIdMod(table::OB_STORAGE_ID_DDL, ObStorageUsedMod::STORAGE_USED_DDL)))) { LOG_WARN("fail to list directories", K(ret), K(retry_count)); - if (ret == OB_OSS_ERROR) { + if (ret == OB_OBJECT_STORAGE_IO_ERROR) { retry_count++; if (retry_count <= MAX_RETRY_COUNT) { ret = OB_SUCCESS; diff --git a/src/share/backup/ob_backup_connectivity.cpp b/src/share/backup/ob_backup_connectivity.cpp index 99d41ba34..55da133bb 100644 --- a/src/share/backup/ob_backup_connectivity.cpp +++ b/src/share/backup/ob_backup_connectivity.cpp @@ -610,9 +610,7 @@ bool ObBackupCheckFile::is_permission_error_(const int32_t result) int ret = OB_SUCCESS; bool is_permission = false; if (OB_IO_ERROR == result - || OB_OSS_ERROR == result - || OB_COS_ERROR == result - || OB_S3_ERROR == result) { + || OB_OBJECT_STORAGE_IO_ERROR == result) { is_permission = true; } return is_permission; diff --git a/src/share/backup/ob_backup_io_adapter.cpp b/src/share/backup/ob_backup_io_adapter.cpp index 1166ad563..b6e887290 100644 --- a/src/share/backup/ob_backup_io_adapter.cpp +++ b/src/share/backup/ob_backup_io_adapter.cpp @@ -381,10 +381,10 @@ int ObBackupIoAdapter::write_single_file(const common::ObString &uri, const shar if (OB_FAIL(ret)) { } else if (OB_FAIL(open_with_access_type(device_handle, fd, storage_info, uri, OB_STORAGE_ACCESS_OVERWRITER, storage_id_mod))) { - OB_LOG(WARN, "fail to get device and open file !", K(uri), K(ret)); + OB_LOG(WARN, "fail to get device and open file !", K(uri), K(ret), K(storage_info)); } else if (FALSE_IT(fd.device_handle_ = device_handle)) { } else if (OB_FAIL(io_manager_write(buf, 0, size, fd, write_size))) { - STORAGE_LOG(WARN, "fail to io manager write", K(ret), K(uri), K(size), K(fd)); + STORAGE_LOG(WARN, "fail to io manager write", K(ret), K(uri), K(storage_info), K(size), K(fd)); } if (OB_SUCCESS != (ret_tmp = close_device_and_fd(device_handle, fd))) { @@ -427,12 +427,12 @@ int ObBackupIoAdapter::pwrite( ret = OB_INVALID_ARGUMENT; OB_LOG(WARN, "invalid access type", K(ret), K(access_type)); } else if (OB_FAIL(open_with_access_type(device_handle, fd, storage_info, uri, access_type, storage_id_mod))) { - OB_LOG(WARN, "fail to get device and open file !", K(uri), K(ret)); + OB_LOG(WARN, "fail to get device and open file !", K(uri), K(storage_info), K(ret)); } else if (FALSE_IT(fd.device_handle_ = device_handle)) { } else if (OB_FAIL(io_manager_write(buf, offset, size, fd, write_size))) { - STORAGE_LOG(WARN, "fail to io manager write", K(ret), K(uri), K(size), K(fd)); + STORAGE_LOG(WARN, "fail to io manager write", K(ret), K(uri), K(storage_info), K(size), K(fd)); } else if (is_can_seal && OB_FAIL(device_handle->seal_file(fd))) { - STORAGE_LOG(WARN, "fail to seal file", K(ret), K(uri), K(fd)); + STORAGE_LOG(WARN, "fail to seal file", K(ret), K(uri), K(storage_info), K(fd)); } if (OB_SUCCESS != (ret_tmp = close_device_and_fd(device_handle, fd))) { @@ -550,13 +550,13 @@ int ObBackupIoAdapter::read_single_file(const common::ObString &uri, const share OB_LOG(WARN, "fail to get device and open file !", K(uri), K(ret)); } else if (FALSE_IT(fd.device_handle_ = device_handle)) { } else if (OB_FAIL(io_manager_read(buf, 0, buf_size, fd, read_size))) { - OB_LOG(WARN, "fail to io manager read", K(ret), K(uri), K(buf_size), K(fd)); + OB_LOG(WARN, "fail to io manager read", K(ret), K(uri), K(storage_info), K(buf_size), K(fd)); } else if (OB_FAIL(get_file_length(uri, storage_info, file_length))) { - OB_LOG(WARN, "failed to get file size", K(ret), K(uri)); + OB_LOG(WARN, "failed to get file size", K(ret), K(uri), K(storage_info)); } else if (file_length != read_size) { ret = OB_BUF_NOT_ENOUGH; OB_LOG(WARN, "not whole file read, maybe buf not enough", - K(ret), K(read_size), K(file_length), K(uri)); + K(ret), K(read_size), K(file_length), K(uri), K(storage_info)); } if (OB_SUCCESS != (ret_tmp = close_device_and_fd(device_handle, fd))) { @@ -583,13 +583,13 @@ int ObBackupIoAdapter::adaptively_read_single_file(const common::ObString &uri, OB_LOG(WARN, "fail to get device and open file !", K(uri), K(ret)); } else if (FALSE_IT(fd.device_handle_ = device_handle)) { } else if (OB_FAIL(io_manager_read(buf, 0, buf_size, fd, read_size))) { - OB_LOG(WARN, "fail to io manager read", K(ret), K(uri), K(buf_size), K(fd)); + OB_LOG(WARN, "fail to io manager read", K(ret), K(uri), K(storage_info), K(buf_size), K(fd)); } else if (OB_FAIL(adaptively_get_file_length(uri, storage_info, file_length))) { - OB_LOG(WARN, "failed to get file size", K(ret), K(uri)); + OB_LOG(WARN, "failed to get file size", K(ret), K(uri), K(storage_info)); } else if (file_length != read_size) { ret = OB_BUF_NOT_ENOUGH; OB_LOG(WARN, "not whole file read, maybe buf not enough", - K(ret), K(read_size), K(file_length), K(uri)); + K(ret), K(read_size), K(file_length), K(uri), K(storage_info)); } if (OB_SUCCESS != (ret_tmp = close_device_and_fd(device_handle, fd))) { @@ -607,7 +607,7 @@ int ObBackupIoAdapter::read_single_text_file(const common::ObString &uri, const int ret = OB_SUCCESS; int64_t read_size = -1; if (OB_FAIL(ObBackupIoAdapter::read_single_file(uri, storage_info, buf, buf_size, read_size, storage_id_mod))) { - OB_LOG(WARN, "failed to read_single_object", K(ret), K(uri)); + OB_LOG(WARN, "failed to read_single_object", K(ret), K(uri), K(storage_info)); } else if (read_size < 0 || read_size >= buf_size) { ret = OB_BUF_NOT_ENOUGH; OB_LOG(WARN, "buf not enough", K(ret), K(read_size), K(buf_size)); @@ -624,7 +624,7 @@ int ObBackupIoAdapter::adaptively_read_single_text_file(const common::ObString & int ret = OB_SUCCESS; int64_t read_size = -1; if (OB_FAIL(ObBackupIoAdapter::adaptively_read_single_file(uri, storage_info, buf, buf_size, read_size, storage_id_mod))) { - OB_LOG(WARN, "failed to read_single_object", K(ret), K(uri)); + OB_LOG(WARN, "failed to read_single_object", K(ret), K(uri), K(storage_info)); } else if (read_size < 0 || read_size >= buf_size) { ret = OB_BUF_NOT_ENOUGH; OB_LOG(WARN, "buf not enough", K(ret), K(read_size), K(buf_size)); @@ -753,7 +753,7 @@ int ObBackupIoAdapter::pread( OB_LOG(WARN, "fail to get device and open file !", K(uri), KR(ret)); } else if (FALSE_IT(fd.device_handle_ = device_handle)) { } else if (OB_FAIL(io_manager_read(buf, offset, buf_size, fd, read_size))) { - OB_LOG(WARN, "fail to io manager read", KR(ret), K(uri), K(offset), K(buf_size), K(fd)); + OB_LOG(WARN, "fail to io manager read", KR(ret), K(uri), K(storage_info), K(offset), K(buf_size), K(fd)); } if (OB_SUCCESS != (ret_tmp = close_device_and_fd(device_handle, fd))) { diff --git a/src/share/ob_errno.cpp b/src/share/ob_errno.cpp index 40042b6ec..39d3c9663 100644 --- a/src/share/ob_errno.cpp +++ b/src/share/ob_errno.cpp @@ -27593,6 +27593,48 @@ static const _error _error_OB_FILE_DELETE_FAILED = { .ob_str_error = "OBE-00600: internal error code, arguments: -9128, fail to delete file", .ob_str_user_error = "OBE-00600: internal error code, arguments: -9128, fail to delete file" }; +static const _error _error_OB_OBJECT_STORAGE_IO_ERROR = { + .error_name = "OB_OBJECT_STORAGE_IO_ERROR", + .error_cause = "Internal Error", + .error_solution = "Contact OceanBase Support", + .mysql_errno = -1, + .sqlstate = "HY000", + .str_error = "object storage io error", + .str_user_error = "object storage io error", + .oracle_errno = 600, + .oracle_str_error = "ORA-00600: internal error code, arguments: -9129, object storage io error", + .oracle_str_user_error = "ORA-00600: internal error code, arguments: -9129, object storage io error", + .ob_str_error = "OBE-00600: internal error code, arguments: -9129, object storage io error", + .ob_str_user_error = "OBE-00600: internal error code, arguments: -9129, object storage io error" +}; +static const _error _error_OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH = { + .error_name = "OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH", + .error_cause = "Internal Error", + .error_solution = "Contact OceanBase Support", + .mysql_errno = -1, + .sqlstate = "HY000", + .str_error = "the pwrite offset of the object storage is inconsistent", + .str_user_error = "the pwrite offset of the object storage is inconsistent", + .oracle_errno = 600, + .oracle_str_error = "ORA-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent", + .oracle_str_user_error = "ORA-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent", + .ob_str_error = "OBE-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent", + .ob_str_user_error = "OBE-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent" +}; +static const _error _error_OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH = { + .error_name = "OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH", + .error_cause = "Internal Error", + .error_solution = "Contact OceanBase Support", + .mysql_errno = -1, + .sqlstate = "HY000", + .str_error = "the contents of pwrite are inconsistent", + .str_user_error = "the contents of pwrite are inconsistent", + .oracle_errno = 600, + .oracle_str_error = "ORA-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent", + .oracle_str_user_error = "ORA-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent", + .ob_str_error = "OBE-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent", + .ob_str_user_error = "OBE-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent" +}; static const _error _error_OB_ERR_RESIZE_FILE_TO_SMALLER = { .error_name = "OB_ERR_RESIZE_FILE_TO_SMALLER", .error_cause = "Internal Error", @@ -35099,6 +35141,9 @@ struct ObStrErrorInit _errors[-OB_SS_CACHE_REACH_MEM_LIMIT] = &_error_OB_SS_CACHE_REACH_MEM_LIMIT; _errors[-OB_TABLET_STATUS_NO_NEED_TO_SPLIT] = &_error_OB_TABLET_STATUS_NO_NEED_TO_SPLIT; _errors[-OB_FILE_DELETE_FAILED] = &_error_OB_FILE_DELETE_FAILED; + _errors[-OB_OBJECT_STORAGE_IO_ERROR] = &_error_OB_OBJECT_STORAGE_IO_ERROR; + _errors[-OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH] = &_error_OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH; + _errors[-OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH] = &_error_OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH; _errors[-OB_ERR_RESIZE_FILE_TO_SMALLER] = &_error_OB_ERR_RESIZE_FILE_TO_SMALLER; _errors[-OB_MARK_BLOCK_INFO_TIMEOUT] = &_error_OB_MARK_BLOCK_INFO_TIMEOUT; _errors[-OB_NOT_READY_TO_EXTEND_FILE] = &_error_OB_NOT_READY_TO_EXTEND_FILE; @@ -35528,7 +35573,7 @@ namespace oceanbase { namespace common { -int g_all_ob_errnos[2363] = {0, -4000, -4001, -4002, -4003, -4004, -4005, -4006, -4007, -4008, -4009, -4010, -4011, -4012, -4013, -4014, -4015, -4016, -4017, -4018, -4019, -4020, -4021, -4022, -4023, -4024, -4025, -4026, -4027, -4028, -4029, -4030, -4031, -4032, -4033, -4034, -4035, -4036, -4037, -4038, -4039, -4041, -4042, -4043, -4044, -4045, -4046, -4047, -4048, -4049, -4050, -4051, -4052, -4053, -4054, -4055, -4057, -4058, -4060, -4061, -4062, -4063, -4064, -4065, -4066, -4067, -4068, -4070, -4071, -4072, -4073, -4074, -4075, -4076, -4077, -4078, -4080, -4081, -4084, -4085, -4090, -4097, -4098, -4099, -4100, -4101, -4102, -4103, -4104, -4105, -4106, -4107, -4108, -4109, -4110, -4111, -4112, -4113, -4114, -4115, -4116, -4117, -4118, -4119, -4120, -4121, -4122, -4123, -4124, -4125, -4126, -4127, -4128, -4133, -4138, -4139, -4142, -4143, -4144, -4146, -4147, -4149, -4150, -4151, -4152, -4153, -4154, -4155, -4156, -4157, -4158, -4159, -4160, -4161, -4162, -4163, -4164, -4165, -4166, -4167, -4168, -4169, -4170, -4171, -4172, -4173, -4174, -4175, -4176, -4177, -4178, -4179, -4180, -4181, -4182, -4183, -4184, -4185, -4186, -4187, -4188, -4189, -4190, -4191, -4192, -4200, -4201, -4204, -4205, -4206, -4207, -4208, -4209, -4210, -4211, -4212, -4213, -4214, -4215, -4216, -4217, -4218, -4219, -4220, -4221, -4222, -4223, -4224, -4225, -4226, -4227, -4228, -4229, -4230, -4231, -4232, -4233, -4234, -4235, -4236, -4237, -4238, -4239, -4240, -4241, -4242, -4243, -4244, -4245, -4246, -4247, -4248, -4249, -4250, -4251, -4252, -4253, -4254, -4255, -4256, -4257, -4258, -4260, -4261, -4262, -4263, -4264, -4265, -4266, -4267, -4268, -4269, -4270, -4271, -4273, -4274, -4275, -4276, -4277, -4278, -4279, -4280, -4281, -4282, -4283, -4284, -4285, -4286, -4287, -4288, -4289, -4290, -4291, -4292, -4293, -4294, -4295, -4296, -4297, -4298, -4299, -4300, -4301, -4302, -4303, -4304, -4305, -4306, -4307, -4308, -4309, -4310, -4311, -4312, -4313, -4314, -4315, -4316, -4317, -4318, -4319, -4320, -4321, -4322, -4323, -4324, -4325, -4326, -4327, -4328, -4329, -4330, -4331, -4332, -4333, -4334, -4335, -4336, -4337, -4338, -4339, -4340, -4341, -4342, -4343, -4344, -4345, -4346, -4347, -4348, -4349, -4350, -4351, -4352, -4353, -4354, -4355, -4356, -4357, -4358, -4359, -4360, -4361, -4362, -4363, -4364, -4365, -4366, -4367, -4368, -4369, -4370, -4371, -4372, -4373, -4374, -4375, -4376, -4377, -4378, -4379, -4380, -4381, -4382, -4383, -4385, -4386, -4387, -4388, -4389, -4390, -4391, -4392, -4393, -4394, -4395, -4396, -4397, -4398, -4399, -4400, -4401, -4402, -4403, -4404, -4505, -4507, -4510, -4512, -4515, -4517, -4518, -4519, -4523, -4524, -4525, -4526, -4527, -4528, -4529, -4530, -4531, -4532, -4533, -4537, -4538, -4539, -4540, -4541, -4542, -4543, -4544, -4545, -4546, -4547, -4548, -4549, -4550, -4551, -4552, -4553, -4554, -4600, -4601, -4602, -4603, -4604, -4605, -4606, -4607, -4608, -4609, -4610, -4611, -4613, -4614, -4615, -4620, -4621, -4622, -4623, -4624, -4625, -4626, -4628, -4629, -4630, -4631, -4632, -4633, -4634, -4636, -4637, -4638, -4639, -4640, -4641, -4642, -4643, -4644, -4645, -4646, -4647, -4648, -4649, -4650, -4651, -4652, -4653, -4654, -4655, -4656, -4657, -4658, -4659, -4660, -4661, -4662, -4663, -4664, -4665, -4666, -4667, -4668, -4669, -4670, -4671, -4672, -4673, -4674, -4675, -4676, -4677, -4678, -4679, -4680, -4681, -4682, -4683, -4684, -4685, -4686, -4687, -4688, -4689, -4690, -4691, -4692, -4693, -4694, -4695, -4696, -4697, -4698, -4699, -4700, -4701, -4702, -4703, -4704, -4705, -4706, -4707, -4708, -4709, -4710, -4711, -4712, -4713, -4714, -4715, -4716, -4717, -4718, -4719, -4720, -4721, -4722, -4723, -4724, -4725, -4726, -4727, -4728, -4729, -4730, -4731, -4732, -4733, -4734, -4735, -4736, -4737, -4738, -4739, -4740, -4741, -4742, -4743, -4744, -4745, -4746, -4747, -4748, -4749, -4750, -4751, -4752, -4753, -4754, -4755, -4756, -4757, -4758, -4759, -4760, -4761, -4762, -4763, -4764, -4765, -4766, -4767, -4768, -4769, -4770, -4771, -4772, -4773, -4774, -4775, -4776, -4777, -4778, -4779, -4780, -4781, -4782, -4783, -4784, -4785, -5000, -5001, -5002, -5003, -5006, -5007, -5008, -5010, -5011, -5012, -5014, -5015, -5016, -5017, -5018, -5019, -5020, -5022, -5023, -5024, -5025, -5026, -5027, -5028, -5029, -5030, -5031, -5032, -5034, -5035, -5036, -5037, -5038, -5039, -5040, -5041, -5042, -5043, -5044, -5046, -5047, -5050, -5051, -5052, -5053, -5054, -5055, -5056, -5057, -5058, -5059, -5061, -5063, -5064, -5065, -5066, -5067, -5068, -5069, -5070, -5071, -5072, -5073, -5074, -5080, -5081, -5083, -5084, -5085, -5086, -5087, -5088, -5089, -5090, -5091, -5092, -5093, -5094, -5095, -5096, -5097, -5098, -5099, -5100, -5101, -5102, -5103, -5104, -5105, -5106, -5107, -5108, -5109, -5110, -5111, -5112, -5113, -5114, -5115, -5116, -5117, -5118, -5119, -5120, -5121, -5122, -5123, -5124, -5125, -5130, -5131, -5133, -5134, -5135, -5136, -5137, -5138, -5139, -5140, -5142, -5143, -5144, -5145, -5146, -5147, -5148, -5149, -5150, -5151, -5153, -5154, -5155, -5156, -5157, -5158, -5159, -5160, -5161, -5162, -5163, -5164, -5165, -5166, -5167, -5168, -5169, -5170, -5171, -5172, -5173, -5174, -5175, -5176, -5177, -5178, -5179, -5180, -5181, -5182, -5183, -5184, -5185, -5187, -5188, -5189, -5190, -5191, -5192, -5193, -5194, -5195, -5196, -5197, -5198, -5199, -5200, -5201, -5202, -5203, -5204, -5205, -5206, -5207, -5208, -5209, -5210, -5211, -5212, -5213, -5214, -5215, -5216, -5217, -5218, -5219, -5220, -5221, -5222, -5223, -5224, -5225, -5226, -5227, -5228, -5229, -5230, -5231, -5233, -5234, -5235, -5236, -5237, -5238, -5239, -5240, -5241, -5242, -5243, -5244, -5245, -5246, -5247, -5248, -5249, -5250, -5251, -5252, -5253, -5254, -5255, -5256, -5257, -5258, -5259, -5260, -5261, -5262, -5263, -5264, -5265, -5266, -5267, -5268, -5269, -5270, -5271, -5272, -5273, -5274, -5275, -5276, -5277, -5278, -5279, -5280, -5281, -5282, -5283, -5284, -5285, -5286, -5287, -5288, -5289, -5290, -5291, -5292, -5293, -5294, -5295, -5296, -5297, -5298, -5299, -5300, -5301, -5302, -5303, -5304, -5305, -5306, -5307, -5308, -5309, -5310, -5311, -5312, -5313, -5314, -5315, -5316, -5317, -5318, -5319, -5320, -5321, -5322, -5323, -5324, -5325, -5326, -5327, -5328, -5329, -5330, -5331, -5332, -5333, -5334, -5335, -5336, -5337, -5338, -5339, -5340, -5341, -5342, -5343, -5344, -5345, -5346, -5347, -5348, -5349, -5350, -5351, -5352, -5353, -5354, -5355, -5356, -5357, -5358, -5359, -5360, -5361, -5362, -5363, -5364, -5365, -5366, -5367, -5368, -5369, -5370, -5371, -5372, -5373, -5374, -5375, -5376, -5377, -5378, -5379, -5380, -5381, -5382, -5383, -5384, -5385, -5386, -5387, -5388, -5389, -5390, -5400, -5401, -5402, -5403, -5404, -5405, -5406, -5407, -5408, -5409, -5410, -5411, -5412, -5413, -5414, -5415, -5416, -5417, -5418, -5419, -5420, -5421, -5422, -5423, -5424, -5425, -5426, -5427, -5428, -5429, -5430, -5431, -5432, -5433, -5434, -5435, -5436, -5437, -5438, -5439, -5440, -5441, -5442, -5443, -5444, -5445, -5446, -5447, -5448, -5449, -5450, -5451, -5452, -5453, -5454, -5455, -5456, -5457, -5458, -5459, -5460, -5461, -5462, -5463, -5464, -5465, -5466, -5467, -5468, -5469, -5470, -5471, -5472, -5473, -5474, -5475, -5476, -5477, -5478, -5479, -5480, -5481, -5482, -5483, -5484, -5485, -5486, -5487, -5488, -5489, -5490, -5491, -5492, -5493, -5494, -5495, -5496, -5497, -5498, -5499, -5500, -5501, -5502, -5503, -5504, -5505, -5506, -5507, -5508, -5509, -5510, -5511, -5512, -5513, -5514, -5515, -5516, -5517, -5518, -5519, -5520, -5521, -5522, -5540, -5541, -5542, -5543, -5544, -5545, -5546, -5547, -5548, -5549, -5550, -5551, -5552, -5553, -5554, -5555, -5556, -5557, -5558, -5559, -5560, -5561, -5562, -5563, -5564, -5565, -5566, -5567, -5568, -5569, -5570, -5571, -5572, -5573, -5574, -5575, -5576, -5577, -5578, -5579, -5580, -5581, -5582, -5583, -5584, -5585, -5586, -5587, -5588, -5589, -5590, -5591, -5592, -5593, -5594, -5595, -5596, -5597, -5598, -5599, -5600, -5601, -5602, -5603, -5604, -5605, -5607, -5608, -5609, -5610, -5611, -5612, -5613, -5614, -5615, -5616, -5617, -5618, -5619, -5620, -5621, -5622, -5623, -5624, -5625, -5626, -5627, -5628, -5629, -5630, -5631, -5632, -5633, -5634, -5635, -5636, -5637, -5638, -5639, -5640, -5641, -5642, -5643, -5644, -5645, -5646, -5647, -5648, -5649, -5650, -5651, -5652, -5653, -5654, -5655, -5656, -5657, -5658, -5659, -5660, -5661, -5662, -5663, -5664, -5665, -5666, -5667, -5668, -5671, -5672, -5673, -5674, -5675, -5676, -5677, -5678, -5679, -5680, -5681, -5682, -5683, -5684, -5685, -5686, -5687, -5688, -5689, -5690, -5691, -5692, -5693, -5694, -5695, -5696, -5697, -5698, -5699, -5700, -5701, -5702, -5703, -5704, -5705, -5706, -5707, -5708, -5709, -5710, -5711, -5712, -5713, -5714, -5715, -5716, -5717, -5718, -5719, -5720, -5721, -5722, -5723, -5724, -5725, -5726, -5727, -5728, -5729, -5730, -5731, -5732, -5733, -5734, -5735, -5736, -5737, -5738, -5739, -5740, -5741, -5742, -5743, -5744, -5745, -5746, -5747, -5748, -5749, -5750, -5751, -5752, -5753, -5754, -5755, -5756, -5757, -5758, -5759, -5760, -5761, -5762, -5763, -5764, -5765, -5766, -5768, -5769, -5770, -5771, -5772, -5773, -5774, -5777, -5778, -5779, -5780, -5781, -5785, -5786, -5787, -5788, -5789, -5790, -5791, -5792, -5793, -5794, -5795, -5796, -5797, -5798, -5799, -5800, -5801, -5802, -5803, -5804, -5805, -5806, -5807, -5808, -5809, -5810, -5811, -5812, -5813, -5814, -5815, -5816, -5817, -5818, -5819, -5820, -5821, -5822, -5823, -5824, -5825, -5826, -5827, -5828, -5829, -5830, -5831, -5832, -5833, -5834, -5835, -5836, -5837, -5838, -5839, -5840, -5841, -5842, -5843, -5844, -5845, -5846, -5847, -5848, -5849, -5850, -5851, -5852, -5853, -5854, -5855, -5856, -5857, -5858, -5859, -5860, -5861, -5862, -5863, -5864, -5865, -5866, -5867, -5868, -5869, -5870, -5871, -5872, -5873, -5874, -5875, -5876, -5877, -5878, -5879, -5880, -5881, -5882, -5883, -5884, -5885, -5886, -5887, -5888, -5889, -5890, -5891, -5892, -5893, -5894, -5895, -5896, -5897, -5898, -5899, -5900, -5901, -5902, -5903, -5904, -5905, -5906, -5907, -5908, -5909, -5910, -5911, -5912, -5913, -5914, -5915, -5916, -5917, -5918, -5919, -5920, -5921, -5922, -5923, -5924, -5925, -5926, -5927, -5928, -5929, -5930, -5931, -5932, -5933, -5934, -5935, -5936, -5937, -5938, -5939, -5940, -5941, -5942, -5943, -5944, -5945, -5946, -5947, -5948, -5949, -5950, -5951, -5952, -5953, -5954, -5955, -5956, -5957, -5958, -5959, -5960, -5961, -5962, -5963, -5964, -5965, -5966, -5967, -5968, -5969, -5970, -5971, -5972, -5973, -5974, -5975, -5976, -5977, -5978, -5979, -5980, -5981, -5982, -5983, -5984, -5985, -5986, -5987, -5988, -5989, -5990, -5991, -5992, -5993, -5994, -5995, -5996, -5997, -5998, -5999, -6000, -6001, -6002, -6003, -6004, -6005, -6006, -6201, -6202, -6203, -6204, -6205, -6206, -6207, -6208, -6209, -6210, -6211, -6212, -6213, -6214, -6215, -6219, -6220, -6221, -6222, -6223, -6224, -6225, -6226, -6227, -6228, -6229, -6230, -6231, -6232, -6233, -6234, -6235, -6236, -6237, -6238, -6239, -6240, -6241, -6242, -6243, -6244, -6245, -6246, -6247, -6248, -6249, -6250, -6251, -6252, -6253, -6254, -6255, -6256, -6257, -6258, -6259, -6260, -6261, -6262, -6263, -6264, -6265, -6266, -6267, -6268, -6269, -6270, -6271, -6272, -6273, -6274, -6275, -6276, -6277, -6278, -6279, -6280, -6281, -6282, -6283, -6284, -6285, -6301, -6302, -6303, -6304, -6305, -6306, -6307, -6308, -6309, -6310, -6311, -6312, -6313, -6314, -6315, -6316, -6317, -6318, -6319, -6320, -6321, -6322, -6323, -6324, -6325, -6326, -6327, -6328, -6329, -6330, -6331, -6332, -7000, -7001, -7002, -7003, -7004, -7005, -7006, -7007, -7010, -7011, -7012, -7013, -7014, -7015, -7021, -7022, -7024, -7025, -7026, -7027, -7029, -7030, -7031, -7032, -7033, -7034, -7035, -7036, -7037, -7038, -7039, -7040, -7041, -7100, -7101, -7102, -7103, -7104, -7105, -7106, -7107, -7108, -7109, -7110, -7111, -7112, -7113, -7114, -7115, -7116, -7117, -7118, -7119, -7120, -7121, -7122, -7123, -7124, -7125, -7201, -7202, -7203, -7204, -7205, -7206, -7207, -7208, -7209, -7210, -7211, -7212, -7213, -7214, -7215, -7216, -7217, -7218, -7219, -7220, -7221, -7222, -7223, -7224, -7225, -7226, -7227, -7228, -7229, -7230, -7231, -7232, -7233, -7234, -7235, -7236, -7237, -7238, -7239, -7240, -7241, -7242, -7243, -7244, -7246, -7247, -7248, -7249, -7250, -7251, -7252, -7253, -7254, -7255, -7256, -7257, -7258, -7259, -7260, -7261, -7262, -7263, -7264, -7265, -7266, -7267, -7268, -7269, -7270, -7271, -7272, -7273, -7274, -7275, -7276, -7277, -7278, -7279, -7280, -7281, -7282, -7283, -7284, -7285, -7286, -7287, -7288, -7289, -7290, -7291, -7292, -7293, -7294, -7295, -7296, -7297, -7298, -7299, -7300, -7301, -7302, -7402, -7403, -7404, -7405, -7406, -7407, -7408, -7409, -7410, -7411, -7412, -7413, -7414, -7415, -7416, -7417, -7418, -7419, -7420, -7421, -7422, -7423, -7424, -7425, -7426, -7427, -7428, -7429, -7430, -7431, -7432, -7433, -7434, -7435, -7600, -7601, -7602, -7603, -7604, -8001, -8002, -8003, -8004, -8005, -9001, -9002, -9003, -9004, -9005, -9006, -9007, -9008, -9009, -9010, -9011, -9012, -9013, -9014, -9015, -9016, -9017, -9018, -9019, -9020, -9022, -9023, -9024, -9025, -9026, -9027, -9028, -9029, -9030, -9031, -9032, -9033, -9034, -9035, -9036, -9037, -9038, -9039, -9040, -9041, -9042, -9043, -9044, -9045, -9046, -9047, -9048, -9049, -9050, -9051, -9052, -9053, -9054, -9057, -9058, -9059, -9060, -9061, -9062, -9063, -9064, -9065, -9066, -9069, -9070, -9071, -9072, -9073, -9074, -9075, -9076, -9077, -9078, -9079, -9080, -9081, -9082, -9083, -9084, -9085, -9086, -9087, -9088, -9089, -9090, -9091, -9092, -9093, -9094, -9095, -9096, -9097, -9098, -9099, -9100, -9101, -9102, -9103, -9104, -9105, -9106, -9107, -9108, -9109, -9110, -9111, -9112, -9113, -9114, -9115, -9116, -9117, -9118, -9119, -9120, -9121, -9122, -9123, -9124, -9125, -9126, -9127, -9128, -9200, -9201, -9202, -9203, -9501, -9502, -9503, -9504, -9505, -9506, -9507, -9508, -9509, -9510, -9512, -9513, -9514, -9515, -9516, -9518, -9519, -9520, -9521, -9522, -9523, -9524, -9525, -9526, -9527, -9528, -9529, -9530, -9531, -9532, -9533, -9534, -9535, -9536, -9537, -9538, -9539, -9540, -9541, -9542, -9543, -9544, -9545, -9546, -9547, -9548, -9549, -9550, -9551, -9552, -9553, -9554, -9555, -9556, -9557, -9558, -9559, -9560, -9561, -9562, -9563, -9564, -9565, -9566, -9567, -9568, -9569, -9570, -9571, -9572, -9573, -9574, -9575, -9576, -9577, -9578, -9579, -9580, -9581, -9582, -9583, -9584, -9585, -9586, -9587, -9588, -9589, -9590, -9591, -9592, -9593, -9594, -9595, -9596, -9597, -9598, -9599, -9600, -9601, -9602, -9603, -9604, -9605, -9606, -9607, -9608, -9609, -9610, -9611, -9612, -9613, -9614, -9615, -9616, -9617, -9618, -9619, -9620, -9621, -9622, -9623, -9624, -9625, -9626, -9627, -9628, -9629, -9630, -9631, -9632, -9633, -9634, -9635, -9636, -9637, -9638, -9639, -9640, -9641, -9642, -9643, -9644, -9645, -9646, -9647, -9648, -9649, -9650, -9651, -9652, -9653, -9654, -9655, -9656, -9657, -9658, -9659, -9660, -9661, -9662, -9663, -9664, -9665, -9666, -9667, -9668, -9669, -9670, -9671, -9672, -9673, -9674, -9675, -9676, -9677, -9678, -9679, -9680, -9681, -9682, -9683, -9684, -9685, -9686, -9687, -9688, -9689, -9690, -9691, -9692, -9693, -9694, -9695, -9696, -9697, -9698, -9699, -9700, -9701, -9702, -9703, -9704, -9705, -9706, -9707, -9708, -9709, -9710, -9711, -9712, -9713, -9714, -9715, -9716, -9717, -9718, -9719, -9720, -9721, -9722, -9723, -9724, -9725, -9726, -9727, -9728, -9729, -9730, -9731, -9732, -9733, -9734, -9735, -9736, -9737, -9738, -9739, -9740, -9741, -9742, -9743, -9744, -9745, -9746, -9747, -9748, -9749, -9750, -9751, -9752, -9753, -9754, -9755, -9756, -9757, -9758, -9759, -9760, -9761, -9762, -9763, -9764, -9765, -9766, -9767, -9768, -9769, -9770, -9771, -9772, -9773, -9774, -9775, -9776, -9777, -9778, -9779, -9780, -9781, -9782, -9783, -9784, -9785, -9786, -9787, -9788, -9789, -9790, -9791, -9792, -9793, -9794, -9795, -9796, -9797, -9798, -9799, -9800, -9801, -10500, -10501, -10502, -10503, -10504, -10505, -10506, -10507, -10508, -10509, -10510, -10511, -10512, -10513, -10514, -10515, -10516, -10517, -10650, -11000, -11001, -11002, -11003, -11004, -11005, -11006, -11007, -11008, -11009, -11010, -11011, -11012, -11013, -11014, -11015, -11016, -11017, -11018, -11019, -11020, -11021, -11022, -11023, -11024, -11025, -11026, -11027, -11028, -11029, -11030, -11031, -11032, -11033, -11034, -11035, -11036, -11037, -11038, -11039, -11040, -11041, -11042, -11043, -11044, -11045, -11046, -11047, -11048, -11049, -11050, -11051, -11052, -11053, -11054, -11055, -11056, -11057, -11058, -11059, -11060, -11061, -11062, -11063, -11064, -11065, -20000, -21000, -22998, -30926, -32491, -38104, -38105}; +int g_all_ob_errnos[2366] = {0, -4000, -4001, -4002, -4003, -4004, -4005, -4006, -4007, -4008, -4009, -4010, -4011, -4012, -4013, -4014, -4015, -4016, -4017, -4018, -4019, -4020, -4021, -4022, -4023, -4024, -4025, -4026, -4027, -4028, -4029, -4030, -4031, -4032, -4033, -4034, -4035, -4036, -4037, -4038, -4039, -4041, -4042, -4043, -4044, -4045, -4046, -4047, -4048, -4049, -4050, -4051, -4052, -4053, -4054, -4055, -4057, -4058, -4060, -4061, -4062, -4063, -4064, -4065, -4066, -4067, -4068, -4070, -4071, -4072, -4073, -4074, -4075, -4076, -4077, -4078, -4080, -4081, -4084, -4085, -4090, -4097, -4098, -4099, -4100, -4101, -4102, -4103, -4104, -4105, -4106, -4107, -4108, -4109, -4110, -4111, -4112, -4113, -4114, -4115, -4116, -4117, -4118, -4119, -4120, -4121, -4122, -4123, -4124, -4125, -4126, -4127, -4128, -4133, -4138, -4139, -4142, -4143, -4144, -4146, -4147, -4149, -4150, -4151, -4152, -4153, -4154, -4155, -4156, -4157, -4158, -4159, -4160, -4161, -4162, -4163, -4164, -4165, -4166, -4167, -4168, -4169, -4170, -4171, -4172, -4173, -4174, -4175, -4176, -4177, -4178, -4179, -4180, -4181, -4182, -4183, -4184, -4185, -4186, -4187, -4188, -4189, -4190, -4191, -4192, -4200, -4201, -4204, -4205, -4206, -4207, -4208, -4209, -4210, -4211, -4212, -4213, -4214, -4215, -4216, -4217, -4218, -4219, -4220, -4221, -4222, -4223, -4224, -4225, -4226, -4227, -4228, -4229, -4230, -4231, -4232, -4233, -4234, -4235, -4236, -4237, -4238, -4239, -4240, -4241, -4242, -4243, -4244, -4245, -4246, -4247, -4248, -4249, -4250, -4251, -4252, -4253, -4254, -4255, -4256, -4257, -4258, -4260, -4261, -4262, -4263, -4264, -4265, -4266, -4267, -4268, -4269, -4270, -4271, -4273, -4274, -4275, -4276, -4277, -4278, -4279, -4280, -4281, -4282, -4283, -4284, -4285, -4286, -4287, -4288, -4289, -4290, -4291, -4292, -4293, -4294, -4295, -4296, -4297, -4298, -4299, -4300, -4301, -4302, -4303, -4304, -4305, -4306, -4307, -4308, -4309, -4310, -4311, -4312, -4313, -4314, -4315, -4316, -4317, -4318, -4319, -4320, -4321, -4322, -4323, -4324, -4325, -4326, -4327, -4328, -4329, -4330, -4331, -4332, -4333, -4334, -4335, -4336, -4337, -4338, -4339, -4340, -4341, -4342, -4343, -4344, -4345, -4346, -4347, -4348, -4349, -4350, -4351, -4352, -4353, -4354, -4355, -4356, -4357, -4358, -4359, -4360, -4361, -4362, -4363, -4364, -4365, -4366, -4367, -4368, -4369, -4370, -4371, -4372, -4373, -4374, -4375, -4376, -4377, -4378, -4379, -4380, -4381, -4382, -4383, -4385, -4386, -4387, -4388, -4389, -4390, -4391, -4392, -4393, -4394, -4395, -4396, -4397, -4398, -4399, -4400, -4401, -4402, -4403, -4404, -4505, -4507, -4510, -4512, -4515, -4517, -4518, -4519, -4523, -4524, -4525, -4526, -4527, -4528, -4529, -4530, -4531, -4532, -4533, -4537, -4538, -4539, -4540, -4541, -4542, -4543, -4544, -4545, -4546, -4547, -4548, -4549, -4550, -4551, -4552, -4553, -4554, -4600, -4601, -4602, -4603, -4604, -4605, -4606, -4607, -4608, -4609, -4610, -4611, -4613, -4614, -4615, -4620, -4621, -4622, -4623, -4624, -4625, -4626, -4628, -4629, -4630, -4631, -4632, -4633, -4634, -4636, -4637, -4638, -4639, -4640, -4641, -4642, -4643, -4644, -4645, -4646, -4647, -4648, -4649, -4650, -4651, -4652, -4653, -4654, -4655, -4656, -4657, -4658, -4659, -4660, -4661, -4662, -4663, -4664, -4665, -4666, -4667, -4668, -4669, -4670, -4671, -4672, -4673, -4674, -4675, -4676, -4677, -4678, -4679, -4680, -4681, -4682, -4683, -4684, -4685, -4686, -4687, -4688, -4689, -4690, -4691, -4692, -4693, -4694, -4695, -4696, -4697, -4698, -4699, -4700, -4701, -4702, -4703, -4704, -4705, -4706, -4707, -4708, -4709, -4710, -4711, -4712, -4713, -4714, -4715, -4716, -4717, -4718, -4719, -4720, -4721, -4722, -4723, -4724, -4725, -4726, -4727, -4728, -4729, -4730, -4731, -4732, -4733, -4734, -4735, -4736, -4737, -4738, -4739, -4740, -4741, -4742, -4743, -4744, -4745, -4746, -4747, -4748, -4749, -4750, -4751, -4752, -4753, -4754, -4755, -4756, -4757, -4758, -4759, -4760, -4761, -4762, -4763, -4764, -4765, -4766, -4767, -4768, -4769, -4770, -4771, -4772, -4773, -4774, -4775, -4776, -4777, -4778, -4779, -4780, -4781, -4782, -4783, -4784, -4785, -5000, -5001, -5002, -5003, -5006, -5007, -5008, -5010, -5011, -5012, -5014, -5015, -5016, -5017, -5018, -5019, -5020, -5022, -5023, -5024, -5025, -5026, -5027, -5028, -5029, -5030, -5031, -5032, -5034, -5035, -5036, -5037, -5038, -5039, -5040, -5041, -5042, -5043, -5044, -5046, -5047, -5050, -5051, -5052, -5053, -5054, -5055, -5056, -5057, -5058, -5059, -5061, -5063, -5064, -5065, -5066, -5067, -5068, -5069, -5070, -5071, -5072, -5073, -5074, -5080, -5081, -5083, -5084, -5085, -5086, -5087, -5088, -5089, -5090, -5091, -5092, -5093, -5094, -5095, -5096, -5097, -5098, -5099, -5100, -5101, -5102, -5103, -5104, -5105, -5106, -5107, -5108, -5109, -5110, -5111, -5112, -5113, -5114, -5115, -5116, -5117, -5118, -5119, -5120, -5121, -5122, -5123, -5124, -5125, -5130, -5131, -5133, -5134, -5135, -5136, -5137, -5138, -5139, -5140, -5142, -5143, -5144, -5145, -5146, -5147, -5148, -5149, -5150, -5151, -5153, -5154, -5155, -5156, -5157, -5158, -5159, -5160, -5161, -5162, -5163, -5164, -5165, -5166, -5167, -5168, -5169, -5170, -5171, -5172, -5173, -5174, -5175, -5176, -5177, -5178, -5179, -5180, -5181, -5182, -5183, -5184, -5185, -5187, -5188, -5189, -5190, -5191, -5192, -5193, -5194, -5195, -5196, -5197, -5198, -5199, -5200, -5201, -5202, -5203, -5204, -5205, -5206, -5207, -5208, -5209, -5210, -5211, -5212, -5213, -5214, -5215, -5216, -5217, -5218, -5219, -5220, -5221, -5222, -5223, -5224, -5225, -5226, -5227, -5228, -5229, -5230, -5231, -5233, -5234, -5235, -5236, -5237, -5238, -5239, -5240, -5241, -5242, -5243, -5244, -5245, -5246, -5247, -5248, -5249, -5250, -5251, -5252, -5253, -5254, -5255, -5256, -5257, -5258, -5259, -5260, -5261, -5262, -5263, -5264, -5265, -5266, -5267, -5268, -5269, -5270, -5271, -5272, -5273, -5274, -5275, -5276, -5277, -5278, -5279, -5280, -5281, -5282, -5283, -5284, -5285, -5286, -5287, -5288, -5289, -5290, -5291, -5292, -5293, -5294, -5295, -5296, -5297, -5298, -5299, -5300, -5301, -5302, -5303, -5304, -5305, -5306, -5307, -5308, -5309, -5310, -5311, -5312, -5313, -5314, -5315, -5316, -5317, -5318, -5319, -5320, -5321, -5322, -5323, -5324, -5325, -5326, -5327, -5328, -5329, -5330, -5331, -5332, -5333, -5334, -5335, -5336, -5337, -5338, -5339, -5340, -5341, -5342, -5343, -5344, -5345, -5346, -5347, -5348, -5349, -5350, -5351, -5352, -5353, -5354, -5355, -5356, -5357, -5358, -5359, -5360, -5361, -5362, -5363, -5364, -5365, -5366, -5367, -5368, -5369, -5370, -5371, -5372, -5373, -5374, -5375, -5376, -5377, -5378, -5379, -5380, -5381, -5382, -5383, -5384, -5385, -5386, -5387, -5388, -5389, -5390, -5400, -5401, -5402, -5403, -5404, -5405, -5406, -5407, -5408, -5409, -5410, -5411, -5412, -5413, -5414, -5415, -5416, -5417, -5418, -5419, -5420, -5421, -5422, -5423, -5424, -5425, -5426, -5427, -5428, -5429, -5430, -5431, -5432, -5433, -5434, -5435, -5436, -5437, -5438, -5439, -5440, -5441, -5442, -5443, -5444, -5445, -5446, -5447, -5448, -5449, -5450, -5451, -5452, -5453, -5454, -5455, -5456, -5457, -5458, -5459, -5460, -5461, -5462, -5463, -5464, -5465, -5466, -5467, -5468, -5469, -5470, -5471, -5472, -5473, -5474, -5475, -5476, -5477, -5478, -5479, -5480, -5481, -5482, -5483, -5484, -5485, -5486, -5487, -5488, -5489, -5490, -5491, -5492, -5493, -5494, -5495, -5496, -5497, -5498, -5499, -5500, -5501, -5502, -5503, -5504, -5505, -5506, -5507, -5508, -5509, -5510, -5511, -5512, -5513, -5514, -5515, -5516, -5517, -5518, -5519, -5520, -5521, -5522, -5540, -5541, -5542, -5543, -5544, -5545, -5546, -5547, -5548, -5549, -5550, -5551, -5552, -5553, -5554, -5555, -5556, -5557, -5558, -5559, -5560, -5561, -5562, -5563, -5564, -5565, -5566, -5567, -5568, -5569, -5570, -5571, -5572, -5573, -5574, -5575, -5576, -5577, -5578, -5579, -5580, -5581, -5582, -5583, -5584, -5585, -5586, -5587, -5588, -5589, -5590, -5591, -5592, -5593, -5594, -5595, -5596, -5597, -5598, -5599, -5600, -5601, -5602, -5603, -5604, -5605, -5607, -5608, -5609, -5610, -5611, -5612, -5613, -5614, -5615, -5616, -5617, -5618, -5619, -5620, -5621, -5622, -5623, -5624, -5625, -5626, -5627, -5628, -5629, -5630, -5631, -5632, -5633, -5634, -5635, -5636, -5637, -5638, -5639, -5640, -5641, -5642, -5643, -5644, -5645, -5646, -5647, -5648, -5649, -5650, -5651, -5652, -5653, -5654, -5655, -5656, -5657, -5658, -5659, -5660, -5661, -5662, -5663, -5664, -5665, -5666, -5667, -5668, -5671, -5672, -5673, -5674, -5675, -5676, -5677, -5678, -5679, -5680, -5681, -5682, -5683, -5684, -5685, -5686, -5687, -5688, -5689, -5690, -5691, -5692, -5693, -5694, -5695, -5696, -5697, -5698, -5699, -5700, -5701, -5702, -5703, -5704, -5705, -5706, -5707, -5708, -5709, -5710, -5711, -5712, -5713, -5714, -5715, -5716, -5717, -5718, -5719, -5720, -5721, -5722, -5723, -5724, -5725, -5726, -5727, -5728, -5729, -5730, -5731, -5732, -5733, -5734, -5735, -5736, -5737, -5738, -5739, -5740, -5741, -5742, -5743, -5744, -5745, -5746, -5747, -5748, -5749, -5750, -5751, -5752, -5753, -5754, -5755, -5756, -5757, -5758, -5759, -5760, -5761, -5762, -5763, -5764, -5765, -5766, -5768, -5769, -5770, -5771, -5772, -5773, -5774, -5777, -5778, -5779, -5780, -5781, -5785, -5786, -5787, -5788, -5789, -5790, -5791, -5792, -5793, -5794, -5795, -5796, -5797, -5798, -5799, -5800, -5801, -5802, -5803, -5804, -5805, -5806, -5807, -5808, -5809, -5810, -5811, -5812, -5813, -5814, -5815, -5816, -5817, -5818, -5819, -5820, -5821, -5822, -5823, -5824, -5825, -5826, -5827, -5828, -5829, -5830, -5831, -5832, -5833, -5834, -5835, -5836, -5837, -5838, -5839, -5840, -5841, -5842, -5843, -5844, -5845, -5846, -5847, -5848, -5849, -5850, -5851, -5852, -5853, -5854, -5855, -5856, -5857, -5858, -5859, -5860, -5861, -5862, -5863, -5864, -5865, -5866, -5867, -5868, -5869, -5870, -5871, -5872, -5873, -5874, -5875, -5876, -5877, -5878, -5879, -5880, -5881, -5882, -5883, -5884, -5885, -5886, -5887, -5888, -5889, -5890, -5891, -5892, -5893, -5894, -5895, -5896, -5897, -5898, -5899, -5900, -5901, -5902, -5903, -5904, -5905, -5906, -5907, -5908, -5909, -5910, -5911, -5912, -5913, -5914, -5915, -5916, -5917, -5918, -5919, -5920, -5921, -5922, -5923, -5924, -5925, -5926, -5927, -5928, -5929, -5930, -5931, -5932, -5933, -5934, -5935, -5936, -5937, -5938, -5939, -5940, -5941, -5942, -5943, -5944, -5945, -5946, -5947, -5948, -5949, -5950, -5951, -5952, -5953, -5954, -5955, -5956, -5957, -5958, -5959, -5960, -5961, -5962, -5963, -5964, -5965, -5966, -5967, -5968, -5969, -5970, -5971, -5972, -5973, -5974, -5975, -5976, -5977, -5978, -5979, -5980, -5981, -5982, -5983, -5984, -5985, -5986, -5987, -5988, -5989, -5990, -5991, -5992, -5993, -5994, -5995, -5996, -5997, -5998, -5999, -6000, -6001, -6002, -6003, -6004, -6005, -6006, -6201, -6202, -6203, -6204, -6205, -6206, -6207, -6208, -6209, -6210, -6211, -6212, -6213, -6214, -6215, -6219, -6220, -6221, -6222, -6223, -6224, -6225, -6226, -6227, -6228, -6229, -6230, -6231, -6232, -6233, -6234, -6235, -6236, -6237, -6238, -6239, -6240, -6241, -6242, -6243, -6244, -6245, -6246, -6247, -6248, -6249, -6250, -6251, -6252, -6253, -6254, -6255, -6256, -6257, -6258, -6259, -6260, -6261, -6262, -6263, -6264, -6265, -6266, -6267, -6268, -6269, -6270, -6271, -6272, -6273, -6274, -6275, -6276, -6277, -6278, -6279, -6280, -6281, -6282, -6283, -6284, -6285, -6301, -6302, -6303, -6304, -6305, -6306, -6307, -6308, -6309, -6310, -6311, -6312, -6313, -6314, -6315, -6316, -6317, -6318, -6319, -6320, -6321, -6322, -6323, -6324, -6325, -6326, -6327, -6328, -6329, -6330, -6331, -6332, -7000, -7001, -7002, -7003, -7004, -7005, -7006, -7007, -7010, -7011, -7012, -7013, -7014, -7015, -7021, -7022, -7024, -7025, -7026, -7027, -7029, -7030, -7031, -7032, -7033, -7034, -7035, -7036, -7037, -7038, -7039, -7040, -7041, -7100, -7101, -7102, -7103, -7104, -7105, -7106, -7107, -7108, -7109, -7110, -7111, -7112, -7113, -7114, -7115, -7116, -7117, -7118, -7119, -7120, -7121, -7122, -7123, -7124, -7125, -7201, -7202, -7203, -7204, -7205, -7206, -7207, -7208, -7209, -7210, -7211, -7212, -7213, -7214, -7215, -7216, -7217, -7218, -7219, -7220, -7221, -7222, -7223, -7224, -7225, -7226, -7227, -7228, -7229, -7230, -7231, -7232, -7233, -7234, -7235, -7236, -7237, -7238, -7239, -7240, -7241, -7242, -7243, -7244, -7246, -7247, -7248, -7249, -7250, -7251, -7252, -7253, -7254, -7255, -7256, -7257, -7258, -7259, -7260, -7261, -7262, -7263, -7264, -7265, -7266, -7267, -7268, -7269, -7270, -7271, -7272, -7273, -7274, -7275, -7276, -7277, -7278, -7279, -7280, -7281, -7282, -7283, -7284, -7285, -7286, -7287, -7288, -7289, -7290, -7291, -7292, -7293, -7294, -7295, -7296, -7297, -7298, -7299, -7300, -7301, -7302, -7402, -7403, -7404, -7405, -7406, -7407, -7408, -7409, -7410, -7411, -7412, -7413, -7414, -7415, -7416, -7417, -7418, -7419, -7420, -7421, -7422, -7423, -7424, -7425, -7426, -7427, -7428, -7429, -7430, -7431, -7432, -7433, -7434, -7435, -7600, -7601, -7602, -7603, -7604, -8001, -8002, -8003, -8004, -8005, -9001, -9002, -9003, -9004, -9005, -9006, -9007, -9008, -9009, -9010, -9011, -9012, -9013, -9014, -9015, -9016, -9017, -9018, -9019, -9020, -9022, -9023, -9024, -9025, -9026, -9027, -9028, -9029, -9030, -9031, -9032, -9033, -9034, -9035, -9036, -9037, -9038, -9039, -9040, -9041, -9042, -9043, -9044, -9045, -9046, -9047, -9048, -9049, -9050, -9051, -9052, -9053, -9054, -9057, -9058, -9059, -9060, -9061, -9062, -9063, -9064, -9065, -9066, -9069, -9070, -9071, -9072, -9073, -9074, -9075, -9076, -9077, -9078, -9079, -9080, -9081, -9082, -9083, -9084, -9085, -9086, -9087, -9088, -9089, -9090, -9091, -9092, -9093, -9094, -9095, -9096, -9097, -9098, -9099, -9100, -9101, -9102, -9103, -9104, -9105, -9106, -9107, -9108, -9109, -9110, -9111, -9112, -9113, -9114, -9115, -9116, -9117, -9118, -9119, -9120, -9121, -9122, -9123, -9124, -9125, -9126, -9127, -9128, -9129, -9130, -9131, -9200, -9201, -9202, -9203, -9501, -9502, -9503, -9504, -9505, -9506, -9507, -9508, -9509, -9510, -9512, -9513, -9514, -9515, -9516, -9518, -9519, -9520, -9521, -9522, -9523, -9524, -9525, -9526, -9527, -9528, -9529, -9530, -9531, -9532, -9533, -9534, -9535, -9536, -9537, -9538, -9539, -9540, -9541, -9542, -9543, -9544, -9545, -9546, -9547, -9548, -9549, -9550, -9551, -9552, -9553, -9554, -9555, -9556, -9557, -9558, -9559, -9560, -9561, -9562, -9563, -9564, -9565, -9566, -9567, -9568, -9569, -9570, -9571, -9572, -9573, -9574, -9575, -9576, -9577, -9578, -9579, -9580, -9581, -9582, -9583, -9584, -9585, -9586, -9587, -9588, -9589, -9590, -9591, -9592, -9593, -9594, -9595, -9596, -9597, -9598, -9599, -9600, -9601, -9602, -9603, -9604, -9605, -9606, -9607, -9608, -9609, -9610, -9611, -9612, -9613, -9614, -9615, -9616, -9617, -9618, -9619, -9620, -9621, -9622, -9623, -9624, -9625, -9626, -9627, -9628, -9629, -9630, -9631, -9632, -9633, -9634, -9635, -9636, -9637, -9638, -9639, -9640, -9641, -9642, -9643, -9644, -9645, -9646, -9647, -9648, -9649, -9650, -9651, -9652, -9653, -9654, -9655, -9656, -9657, -9658, -9659, -9660, -9661, -9662, -9663, -9664, -9665, -9666, -9667, -9668, -9669, -9670, -9671, -9672, -9673, -9674, -9675, -9676, -9677, -9678, -9679, -9680, -9681, -9682, -9683, -9684, -9685, -9686, -9687, -9688, -9689, -9690, -9691, -9692, -9693, -9694, -9695, -9696, -9697, -9698, -9699, -9700, -9701, -9702, -9703, -9704, -9705, -9706, -9707, -9708, -9709, -9710, -9711, -9712, -9713, -9714, -9715, -9716, -9717, -9718, -9719, -9720, -9721, -9722, -9723, -9724, -9725, -9726, -9727, -9728, -9729, -9730, -9731, -9732, -9733, -9734, -9735, -9736, -9737, -9738, -9739, -9740, -9741, -9742, -9743, -9744, -9745, -9746, -9747, -9748, -9749, -9750, -9751, -9752, -9753, -9754, -9755, -9756, -9757, -9758, -9759, -9760, -9761, -9762, -9763, -9764, -9765, -9766, -9767, -9768, -9769, -9770, -9771, -9772, -9773, -9774, -9775, -9776, -9777, -9778, -9779, -9780, -9781, -9782, -9783, -9784, -9785, -9786, -9787, -9788, -9789, -9790, -9791, -9792, -9793, -9794, -9795, -9796, -9797, -9798, -9799, -9800, -9801, -10500, -10501, -10502, -10503, -10504, -10505, -10506, -10507, -10508, -10509, -10510, -10511, -10512, -10513, -10514, -10515, -10516, -10517, -10650, -11000, -11001, -11002, -11003, -11004, -11005, -11006, -11007, -11008, -11009, -11010, -11011, -11012, -11013, -11014, -11015, -11016, -11017, -11018, -11019, -11020, -11021, -11022, -11023, -11024, -11025, -11026, -11027, -11028, -11029, -11030, -11031, -11032, -11033, -11034, -11035, -11036, -11037, -11038, -11039, -11040, -11041, -11042, -11043, -11044, -11045, -11046, -11047, -11048, -11049, -11050, -11051, -11052, -11053, -11054, -11055, -11056, -11057, -11058, -11059, -11060, -11061, -11062, -11063, -11064, -11065, -20000, -21000, -22998, -30926, -32491, -38104, -38105}; const char *ob_error_name(const int err) { const char *ret = "Unknown error"; diff --git a/src/share/ob_errno.def b/src/share/ob_errno.def index 84fec684c..754c53567 100755 --- a/src/share/ob_errno.def +++ b/src/share/ob_errno.def @@ -2196,6 +2196,7 @@ DEFINE_ERROR_DEP(OB_TENANT_ID_NOT_MATCH, -8005, -1, "08005", "Tenant id not matc //////////////////////////////////////////////////////////////// DEFINE_ERROR_DEP(OB_URI_ERROR, -9001, -1, "HY000", "URI error"); DEFINE_ERROR_DEP(OB_FINAL_MD5_ERROR, -9002, -1, "HY000", "OSS file MD5 error"); +// do not use OB_OSS_ERROR, use OB_OBJECT_STORAGE_IO_ERROR instead DEFINE_ERROR_DEP(OB_OSS_ERROR, -9003, -1, "HY000", "OSS error"); DEFINE_ERROR_DEP(OB_INIT_MD5_ERROR, -9004, -1, "HY000", "Init MD5 fail"); DEFINE_ERROR_DEP(OB_OUT_OF_ELEMENT, -9005, -1, "HY000", "Out of element"); @@ -2253,6 +2254,7 @@ DEFINE_ERROR(OB_BACKUP_CLEAN_INFO_NOT_EXIST, -9054, -1, "HY000", "backup clean i DEFINE_ERROR_EXT(OB_CANNOT_SET_BACKUP_REGION, -9057, -1, "HY000", "can not set backup region", "can not set backup region, because %s"); DEFINE_ERROR_EXT(OB_CANNOT_SET_BACKUP_ZONE, -9058, -1, "HY000", "can not set backup zone", "can not set backup zone, because %s"); DEFINE_ERROR(OB_BACKUP_BACKUP_REACH_MAX_BACKUP_TIMES, -9059, -1, "HY000", "backup backup has reached max backup times"); +// do not use OB_COS_ERROR, use OB_OBJECT_STORAGE_IO_ERROR instead DEFINE_ERROR_DEP(OB_COS_ERROR, -9060, -1, "HY000", "COS error"); DEFINE_ERROR_DEP(OB_IO_LIMIT, -9061, -1, "HY000", "IO limit"); DEFINE_ERROR_DEP(OB_BACKUP_BACKUP_REACH_COPY_LIMIT, -9062, -1, "HY000", "reach backup backup copy limit"); @@ -2278,6 +2280,7 @@ DEFINE_ERROR(OB_ARCHIVE_LOG_RECYCLED, -9079, -1, "HY000", "archive log had been DEFINE_ERROR_EXT_DEP(OB_BACKUP_FORMAT_FILE_NOT_EXIST, -9080, -1, "HY000", "format file does not exist", "format file does not exist%s"); DEFINE_ERROR_EXT_DEP(OB_BACKUP_FORMAT_FILE_NOT_MATCH, -9081, -1, "HY000", "format file does not match", "format file does not match%s"); DEFINE_ERROR_DEP(OB_BACKUP_DEVICE_OUT_OF_SPACE, -9082, -1, "HY000", "backup device out of space"); +// do not use OB_BACKUP_PWRITE_OFFSET_NOT_MATCH, use OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH instead DEFINE_ERROR_DEP(OB_BACKUP_PWRITE_OFFSET_NOT_MATCH, -9083, -1, "HY000", "the pwrite offset of the object storage is inconsistent"); DEFINE_ERROR_DEP(OB_BACKUP_PWRITE_CONTENT_NOT_MATCH, -9084, -1, "HY000", "the contents of pwrite are inconsistent"); @@ -2304,6 +2307,7 @@ DEFINE_ERROR(OB_FILE_OR_DIRECTORY_EXIST, -9101, -1, "HY000", "file or directory DEFINE_ERROR(OB_FILE_OR_DIRECTORY_PERMISSION_DENIED, -9102, -1, "HY000", "file or directory permission denied"); DEFINE_ERROR(OB_TOO_MANY_OPEN_FILES, -9103, -1, "HY000", "too many open files"); DEFINE_ERROR(OB_DIRECT_LOAD_COMMIT_ERROR, -9104, -1, "HY000", "fail to commit direct load"); +// do not use OB_S3_ERROR, use OB_OBJECT_STORAGE_IO_ERROR instead DEFINE_ERROR_DEP(OB_S3_ERROR, -9105, -1, "HY000", "S3 error"); // For tenant snapshot @@ -2333,6 +2337,9 @@ DEFINE_ERROR_DEP(OB_SS_CACHE_REACH_MEM_LIMIT, -9126, -1, "HY000", "ss_micro_cach 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"); +DEFINE_ERROR_DEP(OB_OBJECT_STORAGE_IO_ERROR, -9129, -1, "HY000", "object storage io error"); +DEFINE_ERROR_DEP(OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH, -9130, -1, "HY000", "the pwrite offset of the object storage is inconsistent"); +DEFINE_ERROR_DEP(OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH, -9131, -1, "HY000", "the contents of pwrite are inconsistent"); // 余留位置,在该行之前继续添加storage错误码 //////////////////////////////////////////////////////////////// diff --git a/src/share/ob_errno.h b/src/share/ob_errno.h index 8cee85502..921a3e3c0 100644 --- a/src/share/ob_errno.h +++ b/src/share/ob_errno.h @@ -3919,6 +3919,9 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219; #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_OBJECT_STORAGE_IO_ERROR__USER_ERROR_MSG "object storage io error" +#define OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH__USER_ERROR_MSG "the pwrite offset of the object storage is inconsistent" +#define OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH__USER_ERROR_MSG "the contents of pwrite are inconsistent" #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" @@ -8254,6 +8257,12 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219; #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_OBJECT_STORAGE_IO_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9129, object storage io error" +#define OB_OBJECT_STORAGE_IO_ERROR__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9129, object storage io error" +#define OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent" +#define OB_OBJECT_STORAGE_PWRITE_OFFSET_NOT_MATCH__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9130, the pwrite offset of the object storage is inconsistent" +#define OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent" +#define OB_OBJECT_STORAGE_PWRITE_CONTENT_NOT_MATCH__OBE_USER_ERROR_MSG "OBE-00600: internal error code, arguments: -9131, the contents of pwrite are inconsistent" #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" @@ -9049,7 +9058,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[2363]; +extern int g_all_ob_errnos[2366]; const char *ob_error_name(const int oberr); const char* ob_error_cause(const int oberr); diff --git a/src/share/object_storage/ob_device_connectivity.cpp b/src/share/object_storage/ob_device_connectivity.cpp index f2485f8b4..4b1e48660 100644 --- a/src/share/object_storage/ob_device_connectivity.cpp +++ b/src/share/object_storage/ob_device_connectivity.cpp @@ -247,7 +247,7 @@ int ObDeviceCheckFile::check_appender_permission_(const ObBackupDest &storage_de bool ObDeviceCheckFile::is_permission_error_(const int result) { - return ((OB_IO_ERROR == result) || (OB_OSS_ERROR == result) || (OB_COS_ERROR == result)); + return ((OB_IO_ERROR == result) || (OB_OBJECT_STORAGE_IO_ERROR == result)); } int ObDeviceCheckFile::storage_time_to_strftime_( diff --git a/src/storage/blocksstable/index_block/ob_index_block_builder.cpp b/src/storage/blocksstable/index_block/ob_index_block_builder.cpp index 4caf78407..e6f462102 100755 --- a/src/storage/blocksstable/index_block/ob_index_block_builder.cpp +++ b/src/storage/blocksstable/index_block/ob_index_block_builder.cpp @@ -1972,9 +1972,7 @@ bool ObSSTableIndexBuilder::is_retriable_error(const int ret_code) const case OB_ALLOCATE_MEMORY_FAILED: case OB_EAGAIN: case OB_IO_ERROR: - case OB_OSS_ERROR: - case OB_COS_ERROR: - case OB_S3_ERROR: + case OB_OBJECT_STORAGE_IO_ERROR: b_ret = true; break; default: diff --git a/unittest/logservice/ob_log_external_storage_common.h b/unittest/logservice/ob_log_external_storage_common.h index 13591e4db..8d57c7240 100644 --- a/unittest/logservice/ob_log_external_storage_common.h +++ b/unittest/logservice/ob_log_external_storage_common.h @@ -297,7 +297,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, palf_id, oldest_block_id)); EXPECT_EQ(start_block_id, oldest_block_id); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case1 not exist"); // OB_ENTRY_NOT_EXIST @@ -351,7 +351,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, palf_id, tmp_start_block_id, newest_block_id)); EXPECT_EQ(newest_block_id, tmp_start_block_id); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case2 not exist"); @@ -396,7 +396,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, palf_id, start_block_id, block_min_scn)); EXPECT_EQ(block_min_scn, scns[0]); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case2 entry not exist"); // OB_ENTRY_NOT_EXIST @@ -474,7 +474,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, palf_id, oldest_block_id)); EXPECT_EQ(oldest_block_id, start_block_id); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR // 删除不存在文件 uint64_t not_exist_tenant_id = 500; diff --git a/unittest/logservice/test_shared_log_utils.cpp b/unittest/logservice/test_shared_log_utils.cpp index f9494541d..bf63f8935 100644 --- a/unittest/logservice/test_shared_log_utils.cpp +++ b/unittest/logservice/test_shared_log_utils.cpp @@ -134,7 +134,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, ObLSID(ls_id), oldest_block_id)); EXPECT_EQ(start_block_id, oldest_block_id); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case1 not exist"); // OB_ENTRY_NOT_EXIST @@ -205,7 +205,7 @@ TEST_F(TestLogEXTUtils, basic_interface) EXPECT_EQ(newest_block_id, end_block_id); } - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case2 not exist"); @@ -250,7 +250,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, ls_id, start_block_id, block_min_scn)); EXPECT_EQ(block_min_scn, scns[0]); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR CLOG_LOG(INFO, "begin case4 entry not exist"); // OB_ENTRY_NOT_EXIST @@ -331,7 +331,7 @@ TEST_F(TestLogEXTUtils, basic_interface) tenant_id, ls_id, oldest_block_id)); EXPECT_EQ(oldest_block_id, start_block_id); - // OB_ALLOCATE_MEMORY_FAILED AND OB_OSS_ERROR + // OB_ALLOCATE_MEMORY_FAILED AND OB_OBJECT_STORAGE_IO_ERROR // 删除不存在文件 uint64_t not_exist_tenant_id = 500; diff --git a/unittest/share/backup/test_backup_access_cos.cpp b/unittest/share/backup/test_backup_access_cos.cpp index 33d4de21b..eed02cbd3 100644 --- a/unittest/share/backup/test_backup_access_cos.cpp +++ b/unittest/share/backup/test_backup_access_cos.cpp @@ -130,7 +130,7 @@ TEST_F(TestBackupIOAdapterAccessCos, test_basic_rw) ASSERT_EQ(5, read_size); offset = strlen(write_content); - ASSERT_EQ(OB_COS_ERROR, + ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, adapter.read_part_file(uri, &cos_base, read_buf, sizeof(read_buf), offset, read_size, ObStorageIdMod::get_default_id_mod())); diff --git a/unittest/share/backup/test_backup_access_s3.cpp b/unittest/share/backup/test_backup_access_s3.cpp index 93bdeedcb..611770a28 100644 --- a/unittest/share/backup/test_backup_access_s3.cpp +++ b/unittest/share/backup/test_backup_access_s3.cpp @@ -127,7 +127,7 @@ TEST_F(TestBackupIOAdapterAccessS3, test_basic_rw) ASSERT_EQ(5, read_size); // offset = strlen(write_content); - // ASSERT_EQ(OB_COS_ERROR, + // ASSERT_EQ(OB_OBJECT_STORAGE_IO_ERROR, // adapter.read_part_file(uri, &s3_base, read_buf, sizeof(read_buf), offset, read_size)); ASSERT_EQ(OB_SUCCESS, adapter.del_file(uri, &s3_base));