zyearn commented on a change in pull request #981: add zone for bili discovery
in fetching server nodes
URL: https://github.com/apache/incubator-brpc/pull/981#discussion_r353596085
##########
File path: src/brpc/policy/discovery_naming_service.cpp
##########
@@ -348,9 +349,14 @@ int DiscoveryNamingService::GetServers(const char*
service_name,
}
servers->clear();
Controller cntl;
- cntl.http_request().uri() = butil::string_printf(
+ std::string uri_str = butil::string_printf(
"/discovery/fetchs?appid=%s&env=%s&status=%s", service_name,
FLAGS_discovery_env.c_str(), FLAGS_discovery_status.c_str());
+ if (!FLAGS_discovery_zone.empty()) {
+ uri_str.append("&zone=", 6);
Review comment:
6可以删掉的
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]