[ 
https://issues.apache.org/jira/browse/SOLR-18298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerry updated SOLR-18298:
-------------------------
    Description: 
Curator's RECONNECTED event is different from the previous RECONNECTED event. 
Before Solr10, the OnReconnect is only triggered after a session expiration and 
reconnection.
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]

But Curator's RECONNECTED event is triggered every time a Solr node is 
disconnected from a ZooKeeper instance and reconnected to another
 ZooKeeper instance

Therefore, currently ZkController.onReconnect is invoked  every time a Solr 
node is disconnected from a ZooKeeper instance and reconnected, which is a huge 
overhead, especially when we need to rolling restart a ZooKeeper Cluster. It 
can take more than 10 minutes for a small Solr cluster to level out.

Similiarly, now ZkController.onDisconnect is triggered just after a 
disconnection from a Zookeeper instance. It should only be triggered after a 
session expiration.

The PR restores the Solr 9 behavior, triggering re-election and other 
initialization staff only when the session actually expires, which 
significantly reduces performance overhead during network hiccups.

  was:
Curator's RECONNECTED event is different from the previous RECONNECTED event. 
Before Solr10, the OnReconnect is only triggered after a session expiration and 
reconnection.
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

But Curator's RECONNECTED event is triggered every time a Solr node is 
disconnected from a ZooKeeper instance and reconnected to another
 ZooKeeper instance

Therefore, currently ZkController.onReconnect is invoked  every time a Solr 
node is disconnected from a ZooKeeper instance and reconnected, which is a huge 
overhead, especially when we need to rolling restart a ZooKeeper Cluster. It 
can take more than 10 minutes for a small Solr cluster to level out.

Similiarly, now ZkController.onDisconnect is triggered just after a 
disconnection from a Zookeeper instance. It should only be triggered after a 
session expiration.


> ZkController.onReconnect Is Triggered Unnecessarily
> ---------------------------------------------------
>
>                 Key: SOLR-18298
>                 URL: https://issues.apache.org/jira/browse/SOLR-18298
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 10.0
>            Reporter: Jerry
>            Priority: Major
>              Labels: patch, pull-request-available, zookeeper
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Curator's RECONNECTED event is different from the previous RECONNECTED event. 
> Before Solr10, the OnReconnect is only triggered after a session expiration 
> and reconnection.
> 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]
> But Curator's RECONNECTED event is triggered every time a Solr node is 
> disconnected from a ZooKeeper instance and reconnected to another
>  ZooKeeper instance
> Therefore, currently ZkController.onReconnect is invoked  every time a Solr 
> node is disconnected from a ZooKeeper instance and reconnected, which is a 
> huge overhead, especially when we need to rolling restart a ZooKeeper 
> Cluster. It can take more than 10 minutes for a small Solr cluster to level 
> out.
> Similiarly, now ZkController.onDisconnect is triggered just after a 
> disconnection from a Zookeeper instance. It should only be triggered after a 
> session expiration.
> The PR restores the Solr 9 behavior, triggering re-election and other 
> initialization staff only when the session actually expires, which 
> significantly reduces performance overhead during network hiccups.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to