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

LBHttpSolrClient.request can return incorrect Rsp.server string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.2, 7.0
    • None
    • None

    Description

      Problem:

      • LBHttpSolrClient.request assigns to rsp.server at line 361 and then at line 366 makes a doRequest(client, req, rsp, isUpdate, false, null); method call.
      • If the original doRequest call(s) did not succeed then later at line 382 additional doRequest calls may happen. These calls could use a different server but currently rsp.server remains unchanged and thus LBHttpSolrClient.request could return an incorrect Rsp.server string value.

      Proposed fix:

      • Change the doRequest method so that it assigns Rsp.server alongside the existing Rsp.rsp assignment.
      • Note that since the HttpSolrClient constructor trims of any trailing / from the baseUrl then the proposed fix potentially minutely changes the Rsp.getServer() return value.
        • Rsp.getServer() is called by HttpShardHandler.submit as srsp.setShardAddress(rsp.getServer());
        • I have not fully checked where/how getShardAddress() is then subsequently used but would very much hope that the removal of a trailing / would not cause any issues.

      Attachments

        1. SOLR-9391.patch
          4 kB
          Christine Poerschke

        Activity

          People

            cpoerschke Christine Poerschke
            cpoerschke Christine Poerschke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: