SOLR-12766: Backoff time for internal requests is never more than 2 seconds

This commit is contained in:
Tomas Fernandez Lobbe 2018-09-13 08:43:10 -07:00
parent dea3d69f95
commit 9f37a6be9b
1 changed files with 1 additions and 1 deletions

View File

@ -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) {