CaoManhDat commented on a change in pull request #1688: URL: https://github.com/apache/lucene-solr/pull/1688#discussion_r463490480
########## File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java ########## @@ -838,6 +840,17 @@ public RouteException(ErrorCode errorCode, NamedList<Throwable> throwables, Map< @Override public NamedList<Object> request(@SuppressWarnings({"rawtypes"})SolrRequest request, String collection) throws SolrServerException, IOException { + return makeRequest(request, collection, null); + } + + /** + * Will execute a request synchronously if asyncListener is null, asynchronously otherwise. + * + * @return A {@link NamedList} with the response if sync, or a {@link NamedList} containing a single Cancellable object if async + */ + NamedList<Object> makeRequest(SolrRequest<?> request, + String collection, + AsyncListener<LBSolrClient.Rsp> asyncListener) throws SolrServerException, IOException { Review comment: Both `LbSolrClient.Rsp` and wrapping `Cancellable` in a `NamedList` seems like a workaround to me. Kinda prefer another option if that exist. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org