Solr
  1. Solr
  2. SOLR-5550

shards.info is not returned in case of short circuited distributed query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.6
    • Fix Version/s: 4.7.1, 4.8, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      Distributed queries which are short circuited and executed locally do not return a shards.info section even when requested.

      Steps to reproduce:

      1. cd solr; ant example; cp -r example example2
      2. cd example; java -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=conf1 -DzkRun -DnumShards=2 -jar start.jar
      3. cd example2; java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar
      4. curl http://localhost:8983/solr/admin/collections?action=CREATE&collection=test1&name=test1&numShards=2&collection.configName=conf1&maxShardsPerNode=3
      5. Add two docs:
        <add>
          <doc>
            <field name="id">a!1</field>
            <field name="name">xyz</field>
            <field name="price">2.00</field>
          </doc>
          <doc>
            <field name="id">b!1</field>
            <field name="name">abc</field>
            <field name="price">5.00</field>
          </doc>
        </add>
        
      6. curl http://localhost:8983/admin/cores?name=test1_shard2_replica2&collection=test1&shard=shard2
      7. curl http://localhost:8983/solr/test1_shard2_replica1/select?_route_=b!&fl=*&start=0&q=*:*&shards.info=true&collection=test1&rows=10
      8. The above will not return shards.info
      9. curl http://localhost:7574/solr/test1/select?_route_=b!&fl=*&start=0&q=*:*&shards.info=true&collection=test1&rows=10
      10. The above will return shards.info
      1. SOLR-5550.patch
        10 kB
        Shalin Shekhar Mangar
      2. SOLR-5550.patch
        4 kB
        Timothy Potter

        Issue Links

          Activity

          Hide
          Timothy Potter added a comment -

          Here's a first cut of a solution to this issue w/o unit test. I wasn't able to find any existing unit tests for short circuited distributed requests, so will need to build out a unit test once I get a better feel for testing distributed requests.

          Show
          Timothy Potter added a comment - Here's a first cut of a solution to this issue w/o unit test. I wasn't able to find any existing unit tests for short circuited distributed requests, so will need to build out a unit test once I get a better feel for testing distributed requests.
          Hide
          Shalin Shekhar Mangar added a comment -

          Added a test which fails without the patch.

          Show
          Shalin Shekhar Mangar added a comment - Added a test which fails without the patch.
          Hide
          ASF subversion and git services added a comment -

          Commit 1578078 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1578078 ]

          SOLR-5550: shards.info is not returned by a short circuited distributed query

          Show
          ASF subversion and git services added a comment - Commit 1578078 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1578078 ] SOLR-5550 : shards.info is not returned by a short circuited distributed query
          Hide
          ASF subversion and git services added a comment -

          Commit 1578083 from shalin@apache.org in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1578083 ]

          SOLR-5550: shards.info is not returned by a short circuited distributed query

          Show
          ASF subversion and git services added a comment - Commit 1578083 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1578083 ] SOLR-5550 : shards.info is not returned by a short circuited distributed query
          Hide
          Shalin Shekhar Mangar added a comment -

          Thanks Tim!

          Show
          Shalin Shekhar Mangar added a comment - Thanks Tim!
          Hide
          Shalin Shekhar Mangar added a comment -

          Oh, just fyi, I made one change before committing the patch. I reduced shardCount to 4 from 8. No need to spin up extra replicas here.

          Show
          Shalin Shekhar Mangar added a comment - Oh, just fyi, I made one change before committing the patch. I reduced shardCount to 4 from 8. No need to spin up extra replicas here.
          Hide
          Steve Rowe added a comment -

          Shalin Shekhar Mangar, Timothy Potter, any reason not to backport this to 4.7.1?

          Show
          Steve Rowe added a comment - Shalin Shekhar Mangar , Timothy Potter , any reason not to backport this to 4.7.1?
          Hide
          Shalin Shekhar Mangar added a comment -

          Thanks Steve. I'll backport it.

          Show
          Shalin Shekhar Mangar added a comment - Thanks Steve. I'll backport it.
          Hide
          ASF subversion and git services added a comment -

          Commit 1580979 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_7'
          [ https://svn.apache.org/r1580979 ]

          SOLR-5550: shards.info is not returned by a short circuited distributed query

          Show
          ASF subversion and git services added a comment - Commit 1580979 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_7' [ https://svn.apache.org/r1580979 ] SOLR-5550 : shards.info is not returned by a short circuited distributed query
          Hide
          ASF subversion and git services added a comment -

          Commit 1580982 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1580982 ]

          SOLR-5550: Move entry to 4.7.1

          Show
          ASF subversion and git services added a comment - Commit 1580982 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1580982 ] SOLR-5550 : Move entry to 4.7.1
          Hide
          ASF subversion and git services added a comment -

          Commit 1580985 from shalin@apache.org in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1580985 ]

          SOLR-5550: Move entry to 4.7.1

          Show
          ASF subversion and git services added a comment - Commit 1580985 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1580985 ] SOLR-5550 : Move entry to 4.7.1
          Hide
          Shalin Shekhar Mangar added a comment -

          Backported to 4.7.1

          Show
          Shalin Shekhar Mangar added a comment - Backported to 4.7.1
          Hide
          Steve Rowe added a comment -

          Bulk close 4.7.1 issues

          Show
          Steve Rowe added a comment - Bulk close 4.7.1 issues

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development