lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SOLR-7842) ZK connection loss or session expiry events should not fire config directory listeners
Date Wed, 29 Jul 2015 08:58:05 GMT

     [ 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


Mime
View raw message