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


##########
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:
   Ah; now I see we can remove the obsolete comment, because you removed the 
explicit calls for timeout configuration that shouldn't be necessary (because 
they should be set on recoveryOnlyHttpClient).  Moreover, to my point earlier, 
we shouldn't need to be creating a new Http2SolrClient at all though!  Thus 
`recoverySolrClientBuilder` could disappear.



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