SOLR-8450: Do not retry admin requests, they are not idempotent.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1724813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2016-01-15 14:13:36 +00:00
parent c6c4dded6d
commit 2789c45a95
1 changed files with 6 additions and 2 deletions

View File

@ -133,7 +133,7 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
return true;
}
log.debug("Do not retry, no rules matched");
log.debug("Do not retry, no allow rules matched");
return false;
}
@ -143,7 +143,11 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
protected boolean handleAsIdempotent(final HttpClientContext context) {
String method = context.getRequest().getRequestLine().getMethod();
context.getRequest().getRequestLine().getUri();
// do not retry admin requests, even if they are GET as they are not idempotent
if (context.getRequest().getRequestLine().getUri().startsWith("/admin/")) {
log.debug("Do not retry, this is an admin request");
return false;
}
return method.equals(GET);
}