github-actions[bot] commented on code in PR #43460: URL: https://github.com/apache/doris/pull/43460#discussion_r1832849889
########## cloud/src/meta-service/meta_service_tablet_stats.cpp: ########## @@ -156,4 +165,240 @@ merge_tablet_stats(stats, detached_stats); } +MetaServiceResponseStatus parse_fix_tablet_stats_param( + std::shared_ptr<ResourceManager> resource_mgr, const std::string& table_id_str, + const std::string& cloud_unique_id_str, int64_t& table_id, std::string& instance_id) { + MetaServiceCode code = MetaServiceCode::OK; + std::string msg; + MetaServiceResponseStatus st; + st.set_code(MetaServiceCode::OK); + + // parse params + try { + table_id = std::stoll(table_id_str); + } catch (...) { + st.set_code(MetaServiceCode::INVALID_ARGUMENT); + st.set_msg("Invalid table_id, table_id: " + table_id_str); + return st; + } + + instance_id = get_instance_id(resource_mgr, cloud_unique_id_str); + if (instance_id.empty()) { + code = MetaServiceCode::INVALID_ARGUMENT; + msg = "empty instance_id"; + LOG(INFO) << msg << ", cloud_unique_id=" << cloud_unique_id_str; + st.set_code(code); + st.set_msg(msg); + return st; + } + return st; +} + +MetaServiceResponseStatus fix_tablet_stats_internal( Review Comment: warning: function 'fix_tablet_stats_internal' exceeds recommended size/complexity thresholds [readability-function-size] ```cpp MetaServiceResponseStatus fix_tablet_stats_internal( ^ ``` <details> <summary>Additional context</summary> **cloud/src/meta-service/meta_service_tablet_stats.cpp:196:** 125 lines including whitespace and comments (threshold 80) ```cpp MetaServiceResponseStatus fix_tablet_stats_internal( ^ ``` </details> ########## cloud/src/meta-service/meta_service_tablet_stats.h: ########## @@ -19,6 +19,8 @@ #include <gen_cpp/cloud.pb.h> Review Comment: warning: 'gen_cpp/cloud.pb.h' file not found [clang-diagnostic-error] ```cpp #include <gen_cpp/cloud.pb.h> ^ ``` ########## cloud/src/meta-service/meta_service_tablet_stats.cpp: ########## @@ -17,13 +17,22 @@ #include "meta-service/meta_service_tablet_stats.h" Review Comment: warning: 'meta-service/meta_service_tablet_stats.h' file not found [clang-diagnostic-error] ```cpp #include "meta-service/meta_service_tablet_stats.h" ^ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org