[ 
https://issues.apache.org/jira/browse/SOLR-16503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884423#comment-17884423
 ] 

Jason Gerlowski commented on SOLR-16503:
----------------------------------------

+1 to this effort!

One additional downside of the "raw" HttpClient usage that I haven't seen 
mentioned yet is that it loses out on a lot of the fancy sysprop/env driven 
features built into our SolrClients.  Case in point: the keystore/truststore 
reloading added to SolrJ in SOLR-16743.  SolrClients pick up these reloads 
automatically, but raw client usage (whether jetty or apache) doesn't.  At my 
work we saw this cause problems in Solr's PKI code, which uses an 
"UpdateShardHandler.getDefaultHttpClient"-provided client.

bq. Is it reasonable approach to introduce another "default" Http2SolrClient 
and start replacing usages piece by piece. 

I'm not sure I can volunteer to switch over every last usage, but I'm willing 
to take a crack at this by adding a new method, deprecating the old, and 
swapping a few usages over?  (I'd probably start with PKI since, as I mentioned 
above, that one caused me some pain at work.)

Is UpdateShardHandler the best place to add the new method, or would another 
location (such as 'SolrClientCache') make more sense?  It feels a bit fishy to 
have big chunks of Solr require access to UpdateShardHandler just so they can 
get a client...

> Switch UpdateShardHandler.getDefaultHttpClient to Jetty HTTP2
> -------------------------------------------------------------
>
>                 Key: SOLR-16503
>                 URL: https://issues.apache.org/jira/browse/SOLR-16503
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: David Smiley
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Screenshot 2024-03-16 at 9.14.36 PM.png
>
>          Time Spent: 9h
>  Remaining Estimate: 0h
>
> Much of Solr's remaining uses of Apache HttpClient (HTTP 1) is due to 
> {{org.apache.solr.update.UpdateShardHandler#getDefaultHttpClient}} which 
> underlies most Solr-to-Solr connectivity.  This also underlies the 
> {{{}CoreContainer.getSolrClientCache{}}}.  Lets switch to Jetty (HTTP 2).
> ----
> In SolrClientCache in particular:
> Switch use of CloudLegacySolrClient.Builder to CloudSolrClient.Builder
> Switch use of HttpSolrClient.Builder to Http2SolrClient.Builder
> Undeprecate all the methods here.  They should not have been deprecated in 
> the first place.
> The constructor: switch from Apache HttpClient to a Jetty HttpClient.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to