Shalin Shekhar Mangar created SOLR-11104:
--------------------------------------------

             Summary: LbHttpSolrClient ignores given HttpClient in constructor 
on 6.x
                 Key: SOLR-11104
                 URL: https://issues.apache.org/jira/browse/SOLR-11104
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: clients - java
    Affects Versions: 6.6, 6.5.1, 6.5, 6.4, 6.3, 6.2, 6.1, 6.0.1
            Reporter: Shalin Shekhar Mangar
            Assignee: Shalin Shekhar Mangar
             Fix For: 6.7


LbHttpSolrClient has the following constructor. This is also used by the 
builder.
{code}
/**
   * The provided httpClient should use a multi-threaded connection manager
   * @deprecated use {@link Builder} instead.  This will soon be a protected
   * method and will only be available for use in implementing subclasses.
   */
  public LBHttpSolrClient(HttpSolrClient.Builder httpSolrClientBuilder,
                          HttpClient httpClient, String... solrServerUrl) {
    clientIsInternal = httpClient == null;
    this.httpSolrClientBuilder = httpSolrClientBuilder;
    httpClient = constructClient(null);
    this.httpClient = httpClient;
    if (solrServerUrl != null) {
      for (String s : solrServerUrl) {
        ServerWrapper wrapper = new ServerWrapper(makeSolrClient(s));
        aliveServers.put(wrapper.getKey(), wrapper);
      }
    }
    updateAliveList();
  }
{code}

The given HttpClient is always ignored. This also means that when using this 
constructor, the the HttpClient created here is never closed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to