ltamber commented on a change in pull request #5603: [Issue
5597][pulsar-client-java] retry when getPartitionedTopicMetadata failed
URL: https://github.com/apache/pulsar/pull/5603#discussion_r346648851
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpClient.java
##########
@@ -127,8 +128,9 @@ public void close() throws IOException {
public <T> CompletableFuture<T> get(String path, Class<T> clazz) {
final CompletableFuture<T> future = new CompletableFuture<>();
try {
- String requestUrl = new
URL(serviceNameResolver.resolveHostUri().toURL(), path).toString();
- String remoteHostName =
serviceNameResolver.resolveHostUri().getHost();
Review comment:
the PulsarServiceNameResolver.resolveHostUri() called twice(every time it
will return the next address) inside HttpClient.get() ,
if service url is http://ip1:port1,ip2:port2, we assume requestUrl is
ip1:port1, the remoteHostName will be ip2, and the next time call
HttpClient.get() the requestUrl is still ip1:port1, the remoteHostName is ip2.
so HttpClient.get() will only request ip1:port1
----------------------------------------------------------------
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