[
https://issues.apache.org/jira/browse/SOLR-5689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-5689:
----------------------------------------
Attachment: SOLR-5689.patch
Trivial fix attached. I'll commit once the test suite succeeds.
> 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
> 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: [email protected]
For additional commands, e-mail: [email protected]