[ 
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. ...if say, the state update thread ends, we know right away we are not a 
functioning Overseer any longer. It might be safer to lock that knowledge in 
there.

Ah.... yeah, you're right.  I went the "volatile boolean alive" route because I 
figured that would be more explicit and easier to understand when looking at 
the start/close methods, as opposed to subtly looking at the threads -- but i 
hadn't considered the case of the Thread's ending themselves.

---

I've updated the patch to rip out thta boolean state variable and instead 
implement isAlive() based on the status of the threads.  So far so good, the 
test still passed.

I also updated the test to interrupt one of the active OverseerThreads -- this 
works correctly as far as the "old" overseer realizing it's no longer alive, 
but even with a really healthy delay of 30 seconds, the "new" overseer doesn't 
seem to go active.

What am i missing? what/when/how should trigger a new leader election when one 
of these overseer threads ends?

(FWIW: I used Thread.interrupt() in the test instead of ClosableThread.close() 
because as far as i could tell, nothing about how the OverseerThread class 
wraps/runs the ClusterStateUpdater & OverseerCollectionProcessor actually 
updates the "isClosed()" status of the Runnables if you call 
OverseerThread.cose() ... is that bug?)





> 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
>
>
> 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]

Reply via email to