Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10276

Update ZK leader election so that leader notices if its leadership is revoked

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.5.3
    • None
    • SolrCloud

    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.

      Attachments

        Activity

          People

            dragonsinth Scott Blum
            jhump Joshua Humphries
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: