You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2015/07/29 10:58:05 UTC
[jira] [Resolved] (SOLR-7842) ZK connection loss or session expiry
events should not fire config directory listeners
[ https://issues.apache.org/jira/browse/SOLR-7842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar resolved SOLR-7842.
-----------------------------------------
Resolution: Fixed
Assignee: Shalin Shekhar Mangar
> ZK connection loss or session expiry events should not fire config directory listeners
> --------------------------------------------------------------------------------------
>
> Key: SOLR-7842
> URL: https://issues.apache.org/jira/browse/SOLR-7842
> Project: Solr
> Issue Type: Bug
> Components: SolrCloud
> Affects Versions: 5.2.1
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Labels: difficulty-easy, impact-low
> Fix For: 5.3, Trunk
>
> Attachments: SOLR-7842.patch
>
>
> The watcher on the config directory has the following in the process method:
> {code}
> Stat stat = null;
> try {
> stat = zkClient.exists(zkDir, null, true);
> } catch (KeeperException e) {
> //ignore , it is not a big deal
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> }
> boolean resetWatcher = false;
> try {
> resetWatcher = fireEventListeners(zkDir);
> } finally {
> if (Event.EventType.None.equals(event.getType())) {
> log.info("A node got unwatched for {}", zkDir);
> } else {
> if (resetWatcher) setConfWatcher(zkDir, this, stat);
> else log.info("A node got unwatched for {}", zkDir);
> }
> }
> {code}
> Even if the watcher is fired because of session expiry or connection loss, the fireEventListeners() method is executed and all subsequent listener invocations fail due to the loss of connection/session. All this is logged as well.
> {code}
> 466879 WARN (Thread-78) [ ] o.a.s.c.ZkController listener throws error
> org.apache.solr.common.SolrException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /configs/jepsen/params.json
> at org.apache.solr.core.RequestParams.getFreshRequestParams(RequestParams.java:158)
> at org.apache.solr.core.SolrConfig.refreshRequestParams(SolrConfig.java:909)
> at org.apache.solr.core.SolrCore$11.run(SolrCore.java:2585)
> at org.apache.solr.cloud.ZkController$4.run(ZkController.java:2385)
> Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /configs/jepsen/params.json
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
> at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045)
> at org.apache.solr.common.cloud.SolrZkClient$4.execute(SolrZkClient.java:302)
> at org.apache.solr.common.cloud.SolrZkClient$4.execute(SolrZkClient.java:299)
> at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:61)
> at org.apache.solr.common.cloud.SolrZkClient.exists(SolrZkClient.java:299)
> at org.apache.solr.core.RequestParams.getFreshRequestParams(RequestParams.java:148)
> ... 3 more
> {code}
> We should check the keeper state in addition to the event type and ignore such events.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org