Solr
  1. Solr
  2. SOLR-5492

Return the replica that actually served the query in shards.info response

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      The shards.info returns all the replicas in the shard that returned the response but it is impossible to figure out which replica was actually used. I propose to add the actual shard that served the request as another attribute in the shards.info response.

      1. SOLR-5492.patch
        1 kB
        Shalin Shekhar Mangar
      2. SOLR-5492-grouping.patch
        5 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          Shalin Shekhar Mangar added a comment -

          I chose to return the actual address as another item in the shards.info response instead of re-ordering the key string. For example:

          "192.168.43.52:8983/solr/collection1/|192.168.43.52:7584/solr/collection1/": {
                "numFound": 14,
                "maxScore": 1,
                "shardAddress": "http://192.168.43.52:8983/solr/collection1/",
                "time": 5
              }
          
          Show
          Shalin Shekhar Mangar added a comment - I chose to return the actual address as another item in the shards.info response instead of re-ordering the key string. For example: "192.168.43.52:8983/solr/collection1/|192.168.43.52:7584/solr/collection1/" : { "numFound" : 14, "maxScore" : 1, "shardAddress" : "http: //192.168.43.52:8983/solr/collection1/" , "time" : 5 }
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Return the replica that actually served the query in shards.info response

          Show
          ASF subversion and git services added a comment - Commit 1545662 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1545662 ] SOLR-5492 : Return the replica that actually served the query in shards.info response
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Return the replica that actually served the query in shards.info response

          Show
          ASF subversion and git services added a comment - Commit 1545663 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1545663 ] SOLR-5492 : Return the replica that actually served the query in shards.info response
          Hide
          Shalin Shekhar Mangar added a comment -

          The shardsAddress key was not returned by grouping responses. This patch adds it to grouping queries as well as asserts its presence. I also added a test for shards.info with the "route" parameter.

          Show
          Shalin Shekhar Mangar added a comment - The shardsAddress key was not returned by grouping responses. This patch adds it to grouping queries as well as asserts its presence. I also added a test for shards.info with the " route " parameter.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Added shardAddress in grouping query responses. Added tests.

          Show
          ASF subversion and git services added a comment - Commit 1550143 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1550143 ] SOLR-5492 : Added shardAddress in grouping query responses. Added tests.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Added shardAddress in grouping query responses. Added tests.

          Show
          ASF subversion and git services added a comment - Commit 1550145 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1550145 ] SOLR-5492 : Added shardAddress in grouping query responses. Added tests.
          Hide
          Uwe Schindler added a comment -

          Hi Shalin, your latest commit causes every Jenkins build to fail:

          REGRESSION:  org.apache.solr.cloud.CustomCollectionTest.testDistribSearch
          
          Error Message:
          missing shard info
          
          Stack Trace:
          java.lang.AssertionError: missing shard info
          	at __randomizedtesting.SeedInfo.seed([35BA8C553A3848FE:B45C024D4D6728C2]:0)
          	at org.junit.Assert.fail(Assert.java:93)
          	at org.junit.Assert.assertTrue(Assert.java:43)
          	at org.junit.Assert.assertNotNull(Assert.java:526)
          	at org.apache.solr.cloud.CustomCollectionTest.testCustomCollectionsAPI(CustomCollectionTest.java:251)
          	at org.apache.solr.cloud.CustomCollectionTest.doTest(CustomCollectionTest.java:130)
          	at org.apache.solr.BaseDistributedSearchTestCase.testDistribSearch(BaseDistributedSearchTestCase.java:843)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          
          Show
          Uwe Schindler added a comment - Hi Shalin, your latest commit causes every Jenkins build to fail: REGRESSION: org.apache.solr.cloud.CustomCollectionTest.testDistribSearch Error Message: missing shard info Stack Trace: java.lang.AssertionError: missing shard info at __randomizedtesting.SeedInfo.seed([35BA8C553A3848FE:B45C024D4D6728C2]:0) at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.assertTrue(Assert.java:43) at org.junit.Assert.assertNotNull(Assert.java:526) at org.apache.solr.cloud.CustomCollectionTest.testCustomCollectionsAPI(CustomCollectionTest.java:251) at org.apache.solr.cloud.CustomCollectionTest.doTest(CustomCollectionTest.java:130) at org.apache.solr.BaseDistributedSearchTestCase.testDistribSearch(BaseDistributedSearchTestCase.java:843) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
          Hide
          ASF subversion and git services added a comment -

          Commit 1550323 from Uwe Schindler in branch 'dev/trunk'
          [ https://svn.apache.org/r1550323 ]

          SOLR-5492: Ignore broken test

          Show
          ASF subversion and git services added a comment - Commit 1550323 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1550323 ] SOLR-5492 : Ignore broken test
          Hide
          ASF subversion and git services added a comment -

          Commit 1550324 from Uwe Schindler in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1550324 ]

          Merged revision(s) 1550323 from lucene/dev/trunk:
          SOLR-5492: Ignore broken test

          Show
          ASF subversion and git services added a comment - Commit 1550324 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1550324 ] Merged revision(s) 1550323 from lucene/dev/trunk: SOLR-5492 : Ignore broken test
          Hide
          Uwe Schindler added a comment -

          I added an @Ignore to the always failing test, to stop Jenkins complaining.

          Show
          Uwe Schindler added a comment - I added an @Ignore to the always failing test, to stop Jenkins complaining.
          Hide
          Shalin Shekhar Mangar added a comment -

          Thanks Uwe. I noted the failure yesterday but I didn't ignore the test because the failure doesn't happen always. I'll investigate.

          Show
          Shalin Shekhar Mangar added a comment - Thanks Uwe. I noted the failure yesterday but I didn't ignore the test because the failure doesn't happen always. I'll investigate.
          Hide
          Shalin Shekhar Mangar added a comment -

          The bug exposed by the failing test is not related to this issue. I opened SOLR-5550 to track it.

          Show
          Shalin Shekhar Mangar added a comment - The bug exposed by the failing test is not related to this issue. I opened SOLR-5550 to track it.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Enabling CustomCollectionTest after removing shards.info test code from it

          Show
          ASF subversion and git services added a comment - Commit 1561271 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1561271 ] SOLR-5492 : Enabling CustomCollectionTest after removing shards.info test code from it
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-5492: Enabling CustomCollectionTest after removing shards.info test code from it

          Show
          ASF subversion and git services added a comment - Commit 1561272 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1561272 ] SOLR-5492 : Enabling CustomCollectionTest after removing shards.info test code from it
          Hide
          Shalin Shekhar Mangar added a comment -

          I enabled the test again after removing the shards.info test code. That code can be added again (maybe as a new test?) with SOLR-5550 but the CustomCollectionTest tests important functionality and should not kept disabled because of this minor feature.

          Show
          Shalin Shekhar Mangar added a comment - I enabled the test again after removing the shards.info test code. That code can be added again (maybe as a new test?) with SOLR-5550 but the CustomCollectionTest tests important functionality and should not kept disabled because of this minor feature.

            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