zddr commented on code in PR #19123:
URL: https://github.com/apache/doris/pull/19123#discussion_r1185631028


##########
be/src/util/network_util.cpp:
##########
@@ -104,6 +104,26 @@ Status hostname_to_ip_addrs(const std::string& name, 
std::vector<std::string>* a
     return Status::OK();
 }
 
+bool is_valid_ip(const std::string& ip) {
+    unsigned char buf[sizeof(struct in6_addr)];
+    return inet_pton(AF_INET, ip.data(), buf) > 0;
+}
+
+std::string hostname_to_ip(const std::string& host) {

Review Comment:
   ’convert hostname to ip ‘ is used for resolve error when ip change,if cache 
result,may lose this effect
   
   



-- 
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

Reply via email to