bszabo97 commented on code in PR #1182:
URL: https://github.com/apache/solr/pull/1182#discussion_r1145069656
##########
solr/core/src/java/org/apache/solr/packagemanager/DefaultPackageRepository.java:
##########
@@ -101,16 +106,21 @@ public Path download(String artifactName) throws
SolrException, IOException {
}
private void initPackages() {
- try (CloseableHttpClient client = HttpClientBuilder.create().build()) {
+ try (Http2SolrClient client =
+ new Http2SolrClient.Builder(repositoryURL).useHttp1_1(true).build()) {
Review Comment:
Sorry it seems like I forgot to answer this. The reason why we need http 1.1
here is because actually we are not talking to Solr here, but the repository
server. I am not really sure at this point if we should use a Solr client for
this communication at all, seems quite silly.
Although I have tried an implementation where I was using a plain jetty
client here, instead of a Solr client but it came out rather ugly and a bit
complicated with all the "random" parameters I had to set a default for - I
stole these default Http2SolrClient, where we initialise the jetty client so in
the end I got mostly the same jetty client.
On the other hand I tried changing the test (PackageManagerCLITest) to
create an http 2 compatible web server for the repository server
[here](https://github.com/apache/solr/blob/11253f05cfb31f9fb945c831d8889b3db1e607f1/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java#L239-L256)
but then I realised that probably repository servers in reality are not
prepared to be compatible with http2 so just changing the test did not seem a
viable option.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]