CaoManhDat commented on a change in pull request #1770:
URL: https://github.com/apache/lucene-solr/pull/1770#discussion_r481570618



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -862,15 +1015,39 @@ public RouteException(ErrorCode errorCode, 
NamedList<Throwable> throwables, Map<
     }
     List<String> inputCollections =
         collection == null ? Collections.emptyList() : 
StrUtils.splitSmart(collection, ",", true);
-    return requestWithRetryOnStaleState(request, 0, inputCollections);
+
+    CompletableFuture<NamedList<Object>> apiFuture = new CompletableFuture<>();
+    final AtomicBoolean cancelled = new AtomicBoolean(false);
+    final AtomicReference<CompletableFuture<NamedList<Object>>> currentFuture 
= new AtomicReference<>();
+    apiFuture.exceptionally((error) -> {
+      if (apiFuture.isCancelled()) {
+        synchronized (cancelled) {

Review comment:
       I will provide feedback on the above LBSolrClient.




----------------------------------------------------------------
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

Reply via email to