TangSiyang2001 commented on code in PR #42413: URL: https://github.com/apache/doris/pull/42413#discussion_r1836030033
########## cloud/src/rate-limiter/rate_limiter.cpp: ########## @@ -93,6 +154,35 @@ bool RpcRateLimiter::get_qps_token(const std::string& instance_id, return qps_token->get_token(get_bvar_qps); } +void RpcRateLimiter::set_max_qps_limit(int64_t max_qps_limit) { + std::lock_guard<bthread::Mutex> l(mutex_); + max_qps_limit_ = max_qps_limit; + auto filter = [this](const auto& kv) { + return !instance_with_specific_limit_.contains(kv.first); + }; + for (auto& [k, v] : qps_limiter_ | std::views::filter(std::move(filter))) { + v->set_max_qps_limit(max_qps_limit); + } +} + +bool RpcRateLimiter::set_max_qps_limit(int64_t max_qps_limit, const std::string& instance_id) { Review Comment: just inheritate the original naming, will be mod -- 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