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 2014/02/11 12:15:22 UTC
[jira] [Resolved] (SOLR-5689) On reconnect, ZkController cancels
election on first context rather than latest
[ https://issues.apache.org/jira/browse/SOLR-5689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar resolved SOLR-5689.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 4.7
5.0
Assignee: Shalin Shekhar Mangar
Thanks Gregory!
> On reconnect, ZkController cancels election on first context rather than latest
> -------------------------------------------------------------------------------
>
> Key: SOLR-5689
> URL: https://issues.apache.org/jira/browse/SOLR-5689
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.6.1, 5.0, 4.7
> Reporter: Gregory Chanan
> Assignee: Shalin Shekhar Mangar
> Fix For: 5.0, 4.7
>
> Attachments: SOLR-5689.patch
>
>
> I haven't tested this yet, so I could be wrong, but this is my reading of the code:
> During init:
> {code}
> ElectionContext context = new OverseerElectionContext(zkClient, overseer, getNodeName());
> overseerElector.setup(context);
> overseerElector.joinElection(context, false);
> {code}
> On reconnect:
> {code}
> ElectionContext context = new OverseerElectionContext(zkClient,overseer, getNodeName());
>
> ElectionContext prevContext = overseerElector.getContext();
> if (prevContext != null) {
> prevContext.cancelElection();
> }
>
> overseerElector.joinElection(context, true);
> {code}
> setup doesn't appear to be called on reconnect, so the new context is never set and the first context gets cancelled over and over.
> A call to overseerElector.setup(context); before joinElection in the reconnect case would address this.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org