TangSiyang2001 commented on code in PR #42413: URL: https://github.com/apache/doris/pull/42413#discussion_r1836027560
########## cloud/src/rate-limiter/rate_limiter.cpp: ########## @@ -41,36 +46,92 @@ void RateLimiter::init(google::protobuf::Service* service) { int64_t max_qps_limit = std::stoll(v.substr(p + 1)); if (max_qps_limit > 0) { rpc_name_to_max_qps_limit[rpc_name] = max_qps_limit; - LOG(INFO) << "set rpc: " << rpc_name << " max_qps_limit: " << max_qps_limit; } } catch (...) { - LOG(WARNING) << "failed to set max_qps_limit to rpc: " << rpc_name + LOG(WARNING) << "failed to parse max_qps_limit to rpc: " << rpc_name << " config: " << v; } } } + return rpc_name_to_max_qps_limit; +} + +template <typename Callable> +void for_each_rpc_name(google::protobuf::Service* service, Callable cb) { Review Comment: There's no need to add a container, this function is only called once when doing init. -- 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