You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Bence Szabó (Jira)" <ji...@apache.org> on 2022/11/09 13:08:00 UTC

[jira] [Comment Edited] (SOLR-16367) Switch from CloudLegacySolrClient to CloudSolrClient

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

Bence Szabó edited comment on SOLR-16367 at 11/9/22 1:07 PM:
-------------------------------------------------------------

Until now I was only able to change the client in the ExportTool.java class. It was only a one-line change but I have run all tests and also tested it manually and it is working as expected. I am sorry that it takes so much time.

I was digging deeper into how the requests are working in this new client because I ran into a problem when changing the client in SolrCLI.java: it sends an http HEAD request to Solr in order to fail fast in case of an authorization error [0]. The {{SolrRequest}} class generally does not support the http HEAD method, but I tried to realise a similar behaviour as seen in the SolrCLI class with several implementation of {{SolrRequest}} but I was not satisfied with any of them.

Do you have any suggestions to what request type/class should I use for this use-case?

[0] [https://github.com/apache/solr/blob/640221a6ada310eae22af28e10a9c6342420898c/solr/core/src/java/org/apache/solr/util/SolrCLI.java#L600] 


was (Author: bszabo97):
Until now I was only able to change the client in the ExportTool.java class. It was only a one-line change but I have run all tests and also tested it manually and it is working as expected. I am sorry that it takes so much time.

I was digging deeper into how the requests are working in this new client because I ran into a problem when changing the client in SolrCLI.java: it sends an http HEAD request to Solr in order to fail fast in case of an authorization error [0]. The {{SolrRequest}} class generally does not support the http HEAD method, but I tried to realise a similar behaviour as seen in the SolrCLI class with several implementation of {{SolrRequest}} but I was not satisfied with any of them.

Do you have any suggestions to what request type should I use for this use-case?

[0] [https://github.com/apache/solr/blob/640221a6ada310eae22af28e10a9c6342420898c/solr/core/src/java/org/apache/solr/util/SolrCLI.java#L600] 

> Switch from CloudLegacySolrClient to CloudSolrClient
> ----------------------------------------------------
>
>                 Key: SOLR-16367
>                 URL: https://issues.apache.org/jira/browse/SOLR-16367
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Priority: Major
>
> CloudLegacySolrClient is deprecated; it uses the Apache HTTP client.  CloudSolrClient uses the Jetty HTTP client, which supports HTTP 2.  In this issue, switch all of Solr to not use CloudLegacySolrClient anymore.



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

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