You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/08/19 10:18:20 UTC
[jira] [Commented] (SOLR-9391) LBHttpSolrClient.request can return
incorrect Rsp.server string
[ https://issues.apache.org/jira/browse/SOLR-9391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427956#comment-15427956 ]
ASF subversion and git services commented on SOLR-9391:
-------------------------------------------------------
Commit 250a867de268b597b840cc38c4d6fe465d54a511 in lucene-solr's branch refs/heads/master from [~cpoerschke]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=250a867 ]
SOLR-9391: LBHttpSolrClient.request now correctly returns Rsp.server when previously skipped servers were successfully tried.
> LBHttpSolrClient.request can return incorrect Rsp.server string
> ---------------------------------------------------------------
>
> Key: SOLR-9391
> URL: https://issues.apache.org/jira/browse/SOLR-9391
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Christine Poerschke
> Assignee: Christine Poerschke
> Priority: Minor
> Attachments: SOLR-9391.patch
>
>
> Problem:
> * [LBHttpSolrClient.request|https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java#L361-L366] 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|https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java#L382] additional {{doRequest}} calls may happen. These calls could use a different server but currently {{rsp.server}} remains unchanged and thus [LBHttpSolrClient.request|https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java#L331] could return an incorrect {{Rsp.server}} string value.
> Proposed fix:
> * Change the [doRequest method|https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java#L409-L413] so that it assigns {{Rsp.server}} alongside the existing {{Rsp.rsp}} assignment.
> * Note that since the [HttpSolrClient constructor|https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java#L190-L199] 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|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java#L200] 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org