dsmiley commented on code in PR #2828: URL: https://github.com/apache/solr/pull/2828#discussion_r1844643643
########## solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java: ########## @@ -210,18 +210,23 @@ private CompletableFuture<NamedList<Object>> doAsyncRequest( RetryListener listener) { String baseUrl = endpoint.toString(); rsp.server = baseUrl; - req.getRequest().setBasePath(baseUrl); - CompletableFuture<NamedList<Object>> future = - ((HttpSolrClientBase) getClient(endpoint)).requestAsync(req.getRequest()); - future.whenComplete( - (result, throwable) -> { - if (!future.isCompletedExceptionally()) { - onSuccessfulRequest(result, endpoint, rsp, isZombie, listener); - } else if (!future.isCancelled()) { - onFailedRequest(throwable, endpoint, isNonRetryable, isZombie, listener); - } - }); - return future; + final var client = (Http2SolrClient) getClient(endpoint); + try { + CompletableFuture<NamedList<Object>> future = + client.requestWithBaseUrl(baseUrl, (c) -> c.requestAsync(req.getRequest())); + future.whenComplete( + (result, throwable) -> { + if (!future.isCompletedExceptionally()) { + onSuccessfulRequest(result, endpoint, rsp, isZombie, listener); + } else if (!future.isCancelled()) { + onFailedRequest(throwable, endpoint, isNonRetryable, isZombie, listener); + } + }); + return future; + } catch (SolrServerException | IOException e) { + // Unreachable, since 'requestWithBaseUrl' above is running the request asynchronously Review Comment: an "assert false" would be helpful. I suppose a requestAsyncWithBaseUrl would be nice but not a big deal. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org