github-actions[bot] commented on code in PR #40786:
URL: https://github.com/apache/doris/pull/40786#discussion_r1758110252
##########
be/src/util/brpc_client_cache.h:
##########
@@ -83,33 +83,47 @@ class BrpcClientCache {
}
std::shared_ptr<T> get_client(const std::string& host, int port) {
- std::string realhost;
- realhost = host;
- if (!is_valid_ip(host)) {
- Status status = ExecEnv::GetInstance()->dns_cache()->get(host,
&realhost);
+ 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();
```
##########
be/src/vec/sink/writer/vtablet_writer.cpp:
##########
@@ -700,11 +700,30 @@ void VNodeChannel::try_send_pending_block(RuntimeState*
state) {
return;
}
+ std::string host = _node_info.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();
```
##########
be/src/util/proto_util.h:
##########
@@ -71,11 +71,26 @@ Status transmit_block_httpv2(ExecEnv* exec_env,
std::unique_ptr<Closure> closure
TNetworkAddress brpc_dest_addr) {
RETURN_IF_ERROR(request_embed_attachment_contain_blockv2(closure->request_.get(),
closure));
+ std::string host = brpc_dest_addr.hostname;
+ 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]