dsmiley commented on code in PR #2276:
URL: https://github.com/apache/solr/pull/2276#discussion_r1510020415


##########
solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java:
##########
@@ -915,18 +907,15 @@ private final void sendPrepRecoveryCmd(String 
leaderBaseUrl, String leaderCoreNa
     int readTimeout =
         conflictWaitMs
             + 
Integer.parseInt(System.getProperty("prepRecoveryReadTimeoutExtraWait", 
"8000"));

Review Comment:
   ooh, okay, here we have a special timeout option unique to this method.



##########
solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java:
##########
@@ -175,24 +175,21 @@ public final void setRecoveringAfterStartup(boolean 
recoveringAfterStartup) {
     this.recoveringAfterStartup = recoveringAfterStartup;
   }
 
-  /** Builds a new HttpSolrClient for use in recovery. Caller must close */
-  private HttpSolrClient.Builder recoverySolrClientBuilder(String baseUrl, 
String leaderCoreName) {
+  private Http2SolrClient.Builder recoverySolrClientBuilder(String baseUrl, 
String leaderCoreName) {
     // workaround for SOLR-13605: get the configured timeouts & set them 
directly
     // (even though getRecoveryOnlyHttpClient() already has them set)
     final UpdateShardHandlerConfig cfg = 
cc.getConfig().getUpdateShardHandlerConfig();
-    return (new HttpSolrClient.Builder(baseUrl)
+    return new Http2SolrClient.Builder(baseUrl)
         .withDefaultCollection(leaderCoreName)
-        .withConnectionTimeout(cfg.getDistributedConnectionTimeout(), 
TimeUnit.MILLISECONDS)
-        .withSocketTimeout(cfg.getDistributedSocketTimeout(), 
TimeUnit.MILLISECONDS)
-        
.withHttpClient(cc.getUpdateShardHandler().getRecoveryOnlyHttpClient()));
+        
.withHttpClient(cc.getUpdateShardHandler().getRecoveryOnlyHttpClient());

Review Comment:
   FYI when re-using a common SolrClient for requests that may need to go to 
various URLs, use `solrRequest.setBasePath(leaderUrl)` to have the request 
indicate where it needs to go, for example.



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

Reply via email to