mirror of https://github.com/apache/lucene.git
SOLR-12766: Backoff time for internal requests is never more than 2 seconds
This commit is contained in:
parent
dea3d69f95
commit
9f37a6be9b
|
@ -170,7 +170,7 @@ public class SolrCmdDistributor implements Closeable {
|
||||||
if (resubmitList.size() > 0) {
|
if (resubmitList.size() > 0) {
|
||||||
// Only backoff once for the full batch
|
// Only backoff once for the full batch
|
||||||
try {
|
try {
|
||||||
int backoffTime = retryPause * resubmitList.get(0).req.retries;
|
int backoffTime = Math.min(retryPause * resubmitList.get(0).req.retries, 2000);
|
||||||
log.debug("Sleeping {}ms before re-submitting {} requests", backoffTime, resubmitList.size());
|
log.debug("Sleeping {}ms before re-submitting {} requests", backoffTime, resubmitList.size());
|
||||||
Thread.sleep(backoffTime);
|
Thread.sleep(backoffTime);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
Loading…
Reference in New Issue