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.