github-actions[bot] commented on code in PR #41782:
URL: https://github.com/apache/doris/pull/41782#discussion_r1818603283


##########
cloud/src/meta-service/meta_service_tablet_stats.cpp:
##########
@@ -156,4 +165,217 @@ void internal_get_tablet_stats(MetaServiceCode& code, 
std::string& msg, Transact
     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:** 104 lines 
including whitespace and comments (threshold 80)
   ```cpp
   MetaServiceResponseStatus fix_tablet_stats_internal(
                             ^
   ```
   
   </details>
   



-- 
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

Reply via email to