github-actions[bot] commented on code in PR #41986: URL: https://github.com/apache/doris/pull/41986#discussion_r1803053336
########## be/src/util/brpc_client_cache.h: ########## @@ -67,6 +67,41 @@ class BrpcClientCache { return get_client(butil::endpoint2str(endpoint).c_str()); } + void refresh_client(const butil::EndPoint& endpoint) { + refresh_client(butil::endpoint2str(endpoint).c_str()); + } + + void refresh_client(const std::string& host_port) { + int pos = host_port.rfind(':'); + std::string host = host_port.substr(0, pos); + int port = 0; + try { + port = stoi(host_port.substr(pos + 1)); + } catch (const std::exception& err) { + LOG(WARNING) << "failed to parse port from " << host_port << ": " << err.what(); + } + refresh_client(host, port); + } + + void refresh_client(const std::string& host, int port) { + std::string realhost = host; + auto dns_cache = ExecEnv::GetInstance()->dns_cache(); Review Comment: warning: 'auto dns_cache' can be declared as 'auto *dns_cache' [readability-qualified-auto] ```suggestion auto *dns_cache = ExecEnv::GetInstance()->dns_cache(); ``` -- 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