Some food for thoughts: if zookeeper can dynamically reconfigure then Solr must 
be able to do so as well. Let’s assume you start with an ensemble 
server1,server2,server3 and store this in the Solr config. During lifetime of 
the Solr service it is changed to server4,server5,server6. Now Solr service is 
restarted and it cannot connect anymore to zookeeper as server1,server2,server3 
do not exist anymore. 
I propose to have a dynamic config file / Solr service to record those changes 
in a local file that is available after restart . 

> Am 27.09.2019 um 19:33 schrieb Shawn Heisey <apa...@elyograg.org>:
> 
> On 9/27/2019 10:39 AM, LEE Ween Jiann wrote:
>> FYI, solr-zookeeper-headless resolves to 3 different IPs. And 
>> getZkRawResponse() method only connects to 1 of the 3.
>> My suggestion is the following:
>> - List<String> zookeepers = Arrays.asList(zkHost.split("/")[0].split(","));
>> + List<String> zookeeperHosts = 
>> Arrays.asList(zkHost.split("/")[0].split(","));
>> + final List<String> zookeepers = new ArrayList<>();
>> + for (String host : zookeeperHosts) {
>> +   // resolve host and add all IP:port to zookeepers array
>> + }
>> Let me know your thoughts.
> 
> I think that Solr should query the ZK client for information about what 
> server hosts are active, rather than relying on the connection string, unless 
> that information cannot be obtained by the client.
> 
> That will be particularly important now that Solr contains ZK client version 
> 3.5.x.  When paired with servers also running 3.5 or later, it is capable of 
> dynamic reconfiguration.  It is entirely possible that the active server list 
> will be very different than the connection string.
> 
> According to the ZK team, the /zookeeper/config znode has this information.  
> I do not know if that is new in version 3.5 or if it also exists in 3.4.
> 
> Thanks,
> Shawn

Reply via email to