Hi team,
    I found a problem: ZkController.onReconnect is triggered unnecessarily.
    Curator's RECONNECTED event is different from the previous RECONNECTED 
event. Before Solr10, the OnReconnect is only triggered after a reconnection 
from a zookeeper session expiration.
    Please check the following

    
https://github.com/apache/solr/blob/fdb5314279657f7895a90123436d834e81ea3157/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ConnectionManager.java#L165
    
https://github.com/apache/solr/blob/fdb5314279657f7895a90123436d834e81ea3157/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ConnectionManager.java#L199
    However Curator's RECONNECTED event is triggered every time a Solr node is 
disconnected from a ZooKeeper instance and reconnected to another ZooKeeper 
instance. As a result, currently ZkController.onReconnect is invoked every time 
a Solr node reconnects to a ZooKeeper instance without a session expiration, 
which is a huge overhead, especially when we need to rolling-restart a 
ZooKeeper cluster for upgrade. It can take more than 10 minutes for a small 
Solr cluster to stabilize.
    Similarly, now ZkController.onDisconnect is triggered just after a 
disconnection from a ZooKeeper instance. It should only be triggered after a 
session expiration.
    I created a PR in my fork: https://github.com/linxiaokun528/solr/pull/1. 
Should I create an issue in Solr Jira and submit a PR to the official 
repository?

Regards,
Jerry

Reply via email to