[
https://issues.apache.org/jira/browse/SOLR-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-5823:
---------------------------
Attachment: SOLR-5823.patch
bq. In other words - get the elector for the overseer and call cancel election
on it.
I started down that route, and it got me past one hurdle, but then when the
test tried to re-use "zkController" (after shutting down "altZk") it wouldn't
ever resume being the overseer ... probably because i had completely removed it
from the election?
rather then trying to "dig up" i took a step back, and completely started from
scratch with my test, focusing on the treating the ZkController as a black box
w/o trying to reach inside to affect the overseer status -- so in this new
patch, i just spin up a random number of nodes, and then iteratively:
* confirm only one ZKController thinks it's the overseer
* shutdown that ZKController
...until there aren't any nodes left.
The only hitch is in dealing with the fact that it might take some time for the
new election to happen (especially on slow jenkins machines) so i included an
edge case check for 0 overseers and in that case the test sleeps a bit - with a
sanity check that we don't go into an infinite loop if the overseer constantly
stays at 0.
[[email protected]]: what do you think of this patch iteration? both of
the current test, and the implementation of "isAlive()" (you didn't comment on
that after my last patch - i think this fits better with your previous feedback)
> Add utility function for internal code to know if it is currently the overseer
> ------------------------------------------------------------------------------
>
> Key: SOLR-5823
> URL: https://issues.apache.org/jira/browse/SOLR-5823
> Project: Solr
> Issue Type: Improvement
> Reporter: Hoss Man
> Attachments: SOLR-5823.patch, SOLR-5823.patch, SOLR-5823.patch,
> SOLR-5823.patch, SOLR-5823.patch
>
>
> It would be useful if there was some Overseer equivalent to
> CloudDescriptor.isLeader() that plugins running in solr could use to know "At
> this moment, am i the leader?"
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]