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

Optimize and expunge deletes should execute only on the leader instead of all replicas of the collection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 8.2
    • SolrCloud
    • None

    Description

      Optimize and expunge deletes are broadcasted to all replicas of the collection (even to replicas of inactive shards!) but they don't need to be. We can optimize by only executing such commands on the leader and have the replicas pull the index over the network when ready.

      Synchronizing replication recovery to happen after optimize completes was trickier in the past when all we had was HTTP requests but now we have the terms mechanism which goes via ZK and can be relied on.

      This gives us a nice way to index/update fully and then call optimize/expunge deletes only on the leader while replicas continue to serve query traffic without disruption. This use-case will also need the ability to route queries only to replicas and not to the leader.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shalin Shalin Shekhar Mangar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: