mirror of https://github.com/apache/lucene.git
SOLR-12766: Log retries after the backoff
This commit is contained in:
parent
d6641ffb1d
commit
a7a4f68da5
|
@ -129,8 +129,6 @@ public class SolrCmdDistributor implements Closeable {
|
||||||
|
|
||||||
for (Error err : errors) {
|
for (Error err : errors) {
|
||||||
try {
|
try {
|
||||||
String oldNodeUrl = err.req.node.getUrl();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if this is a retryable request we may want to retry, depending on the error we received and
|
* if this is a retryable request we may want to retry, depending on the error we received and
|
||||||
* the number of times we have already retried
|
* the number of times we have already retried
|
||||||
|
@ -143,20 +141,6 @@ public class SolrCmdDistributor implements Closeable {
|
||||||
// this can happen in certain situations such as close
|
// this can happen in certain situations such as close
|
||||||
if (isRetry) {
|
if (isRetry) {
|
||||||
err.req.retries++;
|
err.req.retries++;
|
||||||
|
|
||||||
if (err.req.node instanceof ForwardNode) {
|
|
||||||
SolrException.log(SolrCmdDistributor.log, "forwarding update to "
|
|
||||||
+ oldNodeUrl + " failed - retrying ... retries: "
|
|
||||||
+ err.req.retries + "/" + err.req.node.getMaxRetries() + ". "
|
|
||||||
+ err.req.cmd.toString() + " params:"
|
|
||||||
+ err.req.uReq.getParams() + " rsp:" + err.statusCode, err.e);
|
|
||||||
} else {
|
|
||||||
SolrException.log(SolrCmdDistributor.log, "FROMLEADER request to "
|
|
||||||
+ oldNodeUrl + " failed - retrying ... retries: "
|
|
||||||
+ err.req.retries + "/" + err.req.node.getMaxRetries() + ". "
|
|
||||||
+ err.req.cmd.toString() + " params:"
|
|
||||||
+ err.req.uReq.getParams() + " rsp:" + err.statusCode, err.e);
|
|
||||||
}
|
|
||||||
resubmitList.add(err);
|
resubmitList.add(err);
|
||||||
} else {
|
} else {
|
||||||
allErrors.add(err);
|
allErrors.add(err);
|
||||||
|
@ -182,6 +166,19 @@ public class SolrCmdDistributor implements Closeable {
|
||||||
clients.clearErrors();
|
clients.clearErrors();
|
||||||
this.errors.clear();
|
this.errors.clear();
|
||||||
for (Error err : resubmitList) {
|
for (Error err : resubmitList) {
|
||||||
|
if (err.req.node instanceof ForwardNode) {
|
||||||
|
SolrException.log(SolrCmdDistributor.log, "forwarding update to "
|
||||||
|
+ err.req.node.getUrl() + " failed - retrying ... retries: "
|
||||||
|
+ err.req.retries + "/" + err.req.node.getMaxRetries() + ". "
|
||||||
|
+ err.req.cmd.toString() + " params:"
|
||||||
|
+ err.req.uReq.getParams() + " rsp:" + err.statusCode, err.e);
|
||||||
|
} else {
|
||||||
|
SolrException.log(SolrCmdDistributor.log, "FROMLEADER request to "
|
||||||
|
+ err.req.node.getUrl() + " failed - retrying ... retries: "
|
||||||
|
+ err.req.retries + "/" + err.req.node.getMaxRetries() + ". "
|
||||||
|
+ err.req.cmd.toString() + " params:"
|
||||||
|
+ err.req.uReq.getParams() + " rsp:" + err.statusCode, err.e);
|
||||||
|
}
|
||||||
submit(err.req, false);
|
submit(err.req, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue