github-actions[bot] commented on code in PR #43832: URL: https://github.com/apache/doris/pull/43832#discussion_r1839313108
########## cloud/src/resource-manager/resource_manager.cpp: ########## @@ -199,6 +210,27 @@ bool ResourceManager::check_cluster_params_valid(const ClusterPB& cluster, std:: return no_err; } +std::pair<bool, std::string> ResourceManager::get_instance_id_by_cloud_unique_id( + const std::string& cloud_unique_id) { + auto v = split(cloud_unique_id, ':'); + if (v.size() != 3) return {false, ""}; Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion if (v.size() != 3) { return {false, ""}; } ``` ########## cloud/src/resource-manager/resource_manager.cpp: ########## @@ -199,6 +210,27 @@ return no_err; } +std::pair<bool, std::string> ResourceManager::get_instance_id_by_cloud_unique_id( + const std::string& cloud_unique_id) { + auto v = split(cloud_unique_id, ':'); + if (v.size() != 3) return {false, ""}; + // degraded format check it + int version = std::atoi(v[0].c_str()); + if (version != 1) return {false, ""}; Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion if (version != 1) { return {false, ""}; } ``` -- 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