lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <James.D...@ingramcontent.com>
Subject RE: Service Unavailable exceptions not logged
Date Tue, 30 Oct 2012 20:07:05 GMT
Maybe we could just create a second entry in the ErrorCode enum for 503, say, "SERVICE_UNAVAILABLE_NOT_LOGGED"
and change PingRequestHandler to throw exceptions with this new ErrorCode...

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311

From: Tomás Fernández Löbbe [mailto:tomasflobbe@gmail.com]
Sent: Tuesday, October 30, 2012 2:32 PM
To: dev@lucene.apache.org
Subject: Re: Service Unavailable exceptions not logged

Hmmm I see. The problem I'm having is that with SolrCloud, in the case of no available nodes
for a shard the created exception is a 503, and this is something I would like to see logged.
Maybe that exception code should be changed?
On Tue, Oct 30, 2012 at 4:15 PM, Dyer, James <James.Dyer@ingramcontent.com<mailto:James.Dyer@ingramcontent.com>>
wrote:
This was done with https://issues.apache.org/jira/browse/SOLR-2124 .  The idea is that it
is enough to get a 1-line log whenever PingRequestHandler is hit (which will have the response
code).  There is no need to also log a severe exception with a stack trace as this is not
really an error condition.  So if you use PingRequestHandler to take nodes out of a load balancer
rotation, it won't create huge logs.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311

From: Tomás Fernández Löbbe [mailto:tomasflobbe@gmail.com<mailto:tomasflobbe@gmail.com>]
Sent: Tuesday, October 30, 2012 1:55 PM
To: dev@lucene.apache.org<mailto:dev@lucene.apache.org>
Subject: Service Unavailable exceptions not logged

Why are service unavailable exceptions not logged? In the SolrException class, these error
codes are specifically skipped from logging, but I don't understand why. This is the 'log'
method of the SolrException class:

public static void log(Logger log, Throwable e) {
    if (e instanceof SolrException
        && ((SolrException) e).code() == ErrorCode.SERVICE_UNAVAILABLE.code) {
      return;
    }
    String stackTrace = toStr(e);
    String ignore = doIgnore(e, stackTrace);
    if (ignore != null) {
      log.info<http://log.info>(ignore);
      return;
    }
    log.error(stackTrace);

  }

Tomás

Mime
View raw message