chenBright commented on code in PR #2994: URL: https://github.com/apache/brpc/pull/2994#discussion_r2141784494
########## src/brpc/policy/consistent_hashing_load_balancer.cpp: ########## @@ -71,8 +71,8 @@ bool DefaultReplicaPolicy::Build(ServerId server, replicas->clear(); for (size_t i = 0; i < num_replicas; ++i) { char host[256]; - int len = snprintf(host, sizeof(host), "%s-%lu", - endpoint2str(ptr->remote_side()).c_str(), i); + int len = snprintf(host, sizeof(host), "%s-%lu-%s", Review Comment: How to handle the situation where the length exceeds 256? -- 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: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org