This is an automated email from the ASF dual-hosted git repository. gavinchou pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new aea1bd33a06 [Fix](status) Fix wrong status check in data size check (#43545) aea1bd33a06 is described below commit aea1bd33a06d2b3004e79c694ba1d5657c840b81 Author: abmdocrt <lianyuk...@selectdb.com> AuthorDate: Tue Nov 12 13:17:45 2024 +0800 [Fix](status) Fix wrong status check in data size check (#43545) --- be/src/cloud/cloud_meta_mgr.cpp | 6 +++--- be/src/common/status.h | 1 - be/src/olap/schema_change.cpp | 2 +- be/src/olap/tablet.cpp | 2 +- be/src/olap/tablet_manager.cpp | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/be/src/cloud/cloud_meta_mgr.cpp b/be/src/cloud/cloud_meta_mgr.cpp index 0beeea42bd6..5c699ae0159 100644 --- a/be/src/cloud/cloud_meta_mgr.cpp +++ b/be/src/cloud/cloud_meta_mgr.cpp @@ -1203,7 +1203,7 @@ int64_t CloudMetaMgr::get_segment_file_size(const RowsetMeta& rs_meta) { auto st = fs->file_size(segment_path, &segment_file_size); if (!st.ok()) { segment_file_size = 0; - if (st.is<FILE_NOT_EXIST>()) { + if (st.is<NOT_FOUND>()) { LOG(INFO) << "cloud table size correctness check get segment size 0 because " "file not exist! msg:" << st.msg() << ", segment path:" << segment_path; @@ -1239,7 +1239,7 @@ int64_t CloudMetaMgr::get_inverted_index_file_szie(const RowsetMeta& rs_meta) { auto st = fs->file_size(inverted_index_file_path, &file_size); if (!st.ok()) { file_size = 0; - if (st.is<FILE_NOT_EXIST>()) { + if (st.is<NOT_FOUND>()) { LOG(INFO) << "cloud table size correctness check get inverted index v1 " "0 because file not exist! msg:" << st.msg() @@ -1265,7 +1265,7 @@ int64_t CloudMetaMgr::get_inverted_index_file_szie(const RowsetMeta& rs_meta) { auto st = fs->file_size(inverted_index_file_path, &file_size); if (!st.ok()) { file_size = 0; - if (st.is<FILE_NOT_EXIST>()) { + if (st.is<NOT_FOUND>()) { LOG(INFO) << "cloud table size correctness check get inverted index v2 " "0 because file not exist! msg:" << st.msg() << ", inverted index path:" << inverted_index_file_path; diff --git a/be/src/common/status.h b/be/src/common/status.h index 91386a5887e..fac63b19f07 100644 --- a/be/src/common/status.h +++ b/be/src/common/status.h @@ -119,7 +119,6 @@ namespace ErrorCode { E(NEED_SEND_AGAIN, -241, false); \ E(OS_ERROR, -242, true); \ E(DIR_NOT_EXIST, -243, true); \ - E(FILE_NOT_EXIST, -244, true); \ E(CREATE_FILE_ERROR, -245, true); \ E(STL_ERROR, -246, true); \ E(MUTEX_ERROR, -247, true); \ diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp index 5ef85dbaf11..ec291d8d2f0 100644 --- a/be/src/olap/schema_change.cpp +++ b/be/src/olap/schema_change.cpp @@ -1431,7 +1431,7 @@ Status SchemaChangeJob::_validate_alter_result(const TAlterTabletReqV2& request) for (auto& pair : version_rowsets) { RowsetSharedPtr rowset = pair.second; if (!rowset->check_file_exist()) { - return Status::Error<FILE_NOT_EXIST>( + return Status::Error<NOT_FOUND>( "SchemaChangeJob::_validate_alter_result meet invalid rowset"); } } diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index b6b81811091..62efef111d3 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -2833,7 +2833,7 @@ int64_t Tablet::get_inverted_index_file_szie(const RowsetMetaSharedPtr& rs_meta) auto st = fs->file_size(inverted_index_file_path, &file_size); if (!st.ok()) { file_size = 0; - if (st.is<FILE_NOT_EXIST>()) { + if (st.is<NOT_FOUND>()) { LOG(INFO) << " tablet id: " << get_tablet_info().tablet_id << ", rowset id:" << rs_meta->rowset_id() << ", table size correctness check get inverted index v2 failed " diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp index b853401855c..d6a944dbc39 100644 --- a/be/src/olap/tablet_manager.cpp +++ b/be/src/olap/tablet_manager.cpp @@ -955,8 +955,7 @@ Status TabletManager::load_tablet_from_dir(DataDir* store, TTabletId tablet_id, bool exists = false; RETURN_IF_ERROR(io::global_local_filesystem()->exists(header_path, &exists)); if (!exists) { - return Status::Error<FILE_NOT_EXIST>("fail to find header file. [header_path={}]", - header_path); + return Status::Error<NOT_FOUND>("fail to find header file. [header_path={}]", header_path); } TabletMetaSharedPtr tablet_meta(new TabletMeta()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org