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

Queries be served locally rather than being forwarded to another replica

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.10.2
    • 5.1, 6.0
    • SolrCloud
    • None

    Description

      Currently, I see that code flow for a query in SolrCloud is as follows:

      For distributed query:
      SolrCore -> SearchHandler.handleRequestBody() -> HttpShardHandler.submit()

      For non-distributed query:
      SolrCore -> SearchHandler.handleRequestBody() -> QueryComponent.process()




      For a distributed query, the request is always sent to all the shards even if the originating SolrCore (handling the original distributed query) is a replica of one of the shards.
      If the original Solr-Core can check itself before sending http requests for any shard, we can probably save some network hopping and gain some performance.



      We can change SearchHandler.handleRequestBody() or HttpShardHandler.submit() to fix this behavior (most likely the former and not the latter).

      Attachments

        1. SOLR-6832.patch
          14 kB
          Timothy Potter
        2. SOLR-6832.patch
          17 kB
          Sachin Goyal
        3. SOLR-6832.patch
          10 kB
          Sachin Goyal
        4. SOLR-6832.patch
          13 kB
          Sachin Goyal

        Issue Links

          Activity

            People

              thelabdude Timothy Potter
              sachingoyal Sachin Goyal
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: