You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Shrey Narayan (Jira)" <ji...@apache.org> on 2026/08/21 04:44:00 UTC
[jira] [Commented] (SOLR-18298) ZkController.onReconnect Is Triggered Excessively
[ https://issues.apache.org/jira/browse/SOLR-18298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106477#comment-18106477 ]
Shrey Narayan commented on SOLR-18298:
--------------------------------------
hi pls approve , merge.
i fixed bug.
> ZkController.onReconnect Is Triggered Excessively
> -------------------------------------------------
>
> 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: Blocker
> Labels: patch, pull-request-available, zookeeper
> Time Spent: 7h
> 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 or situations like rolling-restart Zookeeper Cluster.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org