Description
When we have an issue with a solr node, it would be nice to revoke its leadership of one or more shard or to revoke its role as overseer without actually restarting the node. (Restarting the node tends to spam the overseer queue since we have a very large number of cores per node.)
Operationally, it would be nice if one could just delete the leader's election node (e.g. its ephemeral sequential node that indicates it as current leader) and to have it notice the change and stop behaving as leader.
Currently, once a node becomes leader, it isn't watching ZK for any changes that could revoke its leadership. I am proposing that, upon being elected leader, it use a ZK watch to monitor its own election node. If its own election node is deleted, it then relinquishes leadership (e.g. calls ElectionContext#cancelElection() and then re-joins the election).
I have a patch with tests that I can contribute.