Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16367 Umbrella: Migrate away from Apache HttpClient.
  3. SOLR-17196

Update IndexFetcher Class to Use Http2SolrClient

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Current implementation use the older HttpSolrClient and created client using PoolingHttpClientConnectionManager calling `getUpdateShardHandler().getRecoveryOnlyConnectionManager()`

      Below is the code that used to create HttpSolrClient in IndexFetcher class.

      HttpClientUtil.createClient(
              httpClientParams,
      core.getCoreContainer().getUpdateShardHandler().getRecoveryOnlyConnectionManager(),
              true,
              executor);

      We are going to replace the above implementation using Http2SolrClient.Builder and calling shardHandler.getRecoveryOnlyClient to use the common pool for recovery task to create Http2SolrClient.

       

      Http2SolrClient httpClient =
              new Http2SolrClient.Builder(leaderBaseUrl)
              .withHttpClient(               core.getCoreContainer().getUpdateShardHandler().getRecoveryOnlyHttpClient())
              .withBasicAuthCredentials(httpBasicAuthUser, httpBasicAuthPassword)
              .build();
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sanjaydutt Sanjay Dutt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: