lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Ribeiro (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-7951) LBHttpSolrClient wraps ALL exceptions in "No live SolrServers available to handle this request" exception, even usage errors
Date Fri, 21 Aug 2015 18:42:46 GMT

    [ https://issues.apache.org/jira/browse/SOLR-7951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14707205#comment-14707205
] 

Edward Ribeiro edited comment on SOLR-7951 at 8/21/15 6:42 PM:
---------------------------------------------------------------

Cool, [~ecario]! :) Only thing I've got confused about the new patch is that it still cast
to SolrServerException. --Shouldn't it be casted to SolrException now?-- I see that the method
signature throws SolrServerException, but I didn't get why it didn't throw ClassCastException...


{code}
    } else if (ex instanceof SolrException) {
      throw (SolrServerException) ex;
{code}

Also, it would be nice to document this as [~markrmiller@gmail.com] suggested above too for
future devs.

Mark, let us know if you think this patch is okay, please? I mean, if it addresses your other
 concerns with my original patch.

ps: So, the test I included was flawed. I wish we had a test to validate this fix. Any ideas?


was (Author: eribeiro):
Cool, [~ecario]! :) Only thing I've got confused about the new patch is that it still cast
to SolrServerException. *Shouldn't it be casted to SolrException now?*

{code}
    } else if (ex instanceof SolrException) {
      throw (SolrServerException) ex;
{code}

Also, it would be nice to document this as [~markrmiller@gmail.com] suggested above too for
future devs.

Mark, let us know if you think this patch is okay, please?

ps: So, the test I included was flawed. I wish we had a test to validate this fix. Any ideas?

> LBHttpSolrClient wraps ALL exceptions in "No live SolrServers available to handle this
request" exception, even usage errors
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7951
>                 URL: https://issues.apache.org/jira/browse/SOLR-7951
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 5.2.1
>            Reporter: Elaine Cario
>            Priority: Minor
>         Attachments: SOLR-7951-4.x.patch, SOLR-7951.patch
>
>
> We were experiencing many "No live SolrServers available to handle this request" exception,
even though we saw no outages with any of our servers.  
> It turned out the actual exceptions were related to the use of wildcards in span queries
(and in some cases other invalid queries or usage-type issues). Traced it back to LBHttpSolrClient
which was wrapping all exceptions, even plain SolrExceptions, in that outer exception.  
> Instead, wrapping in the out exception should be reserved for true communication issues
in SolrCloud, and usage exceptions should be thrown as is.



--
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


Mime
View raw message