Skip to content

Commit

Permalink
SOLR-14828: reduce 'error' logging noise in BaseCloudSolrClient.reque…
Browse files Browse the repository at this point in the history
…stWithRetryOnStaleState (apache#1825)
  • Loading branch information
cpoerschke authored Sep 24, 2020
1 parent c258905 commit 876de8b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,6 @@ protected NamedList<Object> requestWithRetryOnStaleState(@SuppressWarnings({"raw
rootCause instanceof SocketException ||
wasCommError(rootCause));

log.error("Request to collection {} failed due to ({}) {}, retry={} commError={} errorCode={} ",
inputCollections, errorCode, rootCause, retryCount, wasCommError, errorCode);

if (wasCommError
|| (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
Expand All @@ -994,12 +991,15 @@ protected NamedList<Object> requestWithRetryOnStaleState(@SuppressWarnings({"raw
// and we could not get any information from the server
//it is probably not worth trying again and again because
// 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);
}
} else {
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;
if (retryCount < MAX_STALE_RETRIES &&
Expand Down

0 comments on commit 876de8b

Please sign in to comment.