Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.0.1, 6.1, 6.2, 6.3, 6.4, 6.5, 6.5.1, 6.6
-
None
Description
LbHttpSolrClient has the following constructor. This is also used by the builder.
/** * 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(); }
The given HttpClient is always ignored. This also means that when using this constructor, the the HttpClient created here is never closed.
The side effect is that the client passed to the CloudSolrClient via the builder is also ignored in favor of the internally created HttpClient.