acelyc111 commented on code in PR #1869:
URL:
https://github.com/apache/incubator-pegasus/pull/1869#discussion_r1469446201
##########
src/runtime/rpc/rpc_address.cpp:
##########
@@ -27,44 +27,64 @@
#include "runtime/rpc/rpc_address.h"
#include <arpa/inet.h>
+#include <errno.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/socket.h>
+#include "absl/strings/string_view.h"
#include "runtime/rpc/group_address.h"
+#include "utils/error_code.h"
#include "utils/fixed_size_buffer_pool.h"
#include "utils/fmt_logging.h"
#include "utils/ports.h"
+#include "utils/safe_strerror_posix.h"
#include "utils/string_conv.h"
-#include "absl/strings/string_view.h"
#include "utils/strings.h"
namespace dsn {
+/*static*/
+error_s rpc_address::GetAddrInfo(const std::string &hostname, const addrinfo
&hints, AddrInfo *info)
Review Comment:
This function may be slow, it would be better to add cache as well, also add
metrics and slow logs like [1] and [2]. I will merge them ASAP.
1. https://github.com/apache/incubator-pegasus/pull/1873
2. https://github.com/apache/incubator-pegasus/pull/1879
--
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]