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

Querying against an alias can lead to incorrect routing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      collection1 has 2 shards and 1 replica
      collection2 has 8 shards and 1 replica

      I have 8 nodes so collection2 is spread across all 8 , while collection1 is hosted by two nodes

      If we create an alias called "collection1" and point it to "collection2".

      Querying against the alias "collection1" works as expected but what I noticed was the top level queries would only hit 2 out of the 8 JVMs when querying using SolrJ

      It turns out that SolrJ is using the state.json of collection1 ( the actual collection ) and routing queries to only those nodes.

      There are two negatives to this:

      • If those two nodes are down all queries fail.
      • Top level queries are only routed to those two nodes thus causing a skew in the top level requests

      The obvious solution would be to use the state.json file of the underlying collection that the alias is pointing to . But if we have the alias pointing to multiple collections then this might get tricky?

      Attachments

        Issue Links

          Activity

            People

              varun Varun Thacker
              varun Varun Thacker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: