SOLR-14828: reduce 'error' logging noise in BaseCloudSolrClient.requestWithRetryOnStaleState (#1825)

This commit is contained in:
Christine Poerschke 2020-09-24 17:06:45 +01:00 committed by GitHub
parent c258905bd0
commit 876de8be41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -970,9 +970,6 @@ public abstract class BaseCloudSolrClient extends SolrClient {
rootCause instanceof SocketException || rootCause instanceof SocketException ||
wasCommError(rootCause)); wasCommError(rootCause));
log.error("Request to collection {} failed due to ({}) {}, retry={} commError={} errorCode={} ",
inputCollections, errorCode, rootCause, retryCount, wasCommError, errorCode);
if (wasCommError if (wasCommError
|| (exc instanceof RouteException && (errorCode == 503)) // 404 because the core does not exist 503 service unavailable || (exc instanceof RouteException && (errorCode == 503)) // 404 because the core does not exist 503 service unavailable
//TODO there are other reasons for 404. We need to change the solr response format from HTML to structured data to know that //TODO there are other reasons for 404. We need to change the solr response format from HTML to structured data to know that
@ -994,12 +991,15 @@ public abstract class BaseCloudSolrClient extends SolrClient {
// and we could not get any information from the server // and we could not get any information from the server
//it is probably not worth trying again and again because //it is probably not worth trying again and again because
// the state would not have been updated // the state would not have been updated
log.info("trying request again"); log.info("Request to collection {} failed due to ({}) {}, retry={} maxRetries={} commError={} errorCode={} - retrying",
inputCollections, errorCode, rootCause, retryCount, MAX_STALE_RETRIES, wasCommError, errorCode);
return requestWithRetryOnStaleState(request, retryCount + 1, inputCollections); return requestWithRetryOnStaleState(request, retryCount + 1, inputCollections);
} }
} else { } else {
log.info("request was not communication error it seems"); log.info("request was not communication error it seems");
} }
log.info("Request to collection {} failed due to ({}) {}, retry={} maxRetries={} commError={} errorCode={} ",
inputCollections, errorCode, rootCause, retryCount, MAX_STALE_RETRIES, wasCommError, errorCode);
boolean stateWasStale = false; boolean stateWasStale = false;
if (retryCount < MAX_STALE_RETRIES && if (retryCount < MAX_STALE_RETRIES &&