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

Queries be served locally rather than being forwarded to another replica

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.10.2
    • Fix Version/s: 5.1, 6.0
    • Component/s: SolrCloud
    • Labels:
      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
          13 kB
          Sachin Goyal
        2. SOLR-6832.patch
          10 kB
          Sachin Goyal
        3. SOLR-6832.patch
          17 kB
          Sachin Goyal
        4. SOLR-6832.patch
          14 kB
          Timothy Potter

          Issue Links

            Activity

              People

              • Assignee:
                thelabdude Timothy Potter
                Reporter:
                sachingoyal Sachin Goyal
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: