You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/01/14 16:27:10 UTC
[GitHub] markusthoemmes commented on a change in pull request #4141: Use
Stricter Retry Logic in ApacheBlockingContainerClient
markusthoemmes commented on a change in pull request #4141: Use Stricter Retry Logic in ApacheBlockingContainerClient
URL: https://github.com/apache/incubator-openwhisk/pull/4141#discussion_r247560828
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ApacheBlockingContainerClient.scala
##########
@@ -149,11 +156,13 @@ protected class ApacheBlockingContainerClient(hostname: String,
} match {
case Success(response) => response
case Failure(t: RetryableConnectionError) if retry =>
+ val waitTime = (Instant.now.toEpochMilli - start.toEpochMilli).milliseconds
val sleepTime = 50.milliseconds
if (timeout > Duration.Zero) {
Thread.sleep(sleepTime.toMillis)
- val newTimeout = timeout - sleepTime
- execute(request, newTimeout, maxConcurrent, retry = true)
+ val newTimeout = timeout - sleepTime - waitTime
+ val newRetryCount = retryCount + 1
+ execute(request, newTimeout, maxConcurrent, retry = newRetryCount < 3, retryCount = newRetryCount)
Review comment:
If I parse this correctly, we'll allow only for 3 retry attempts? I think a slowly starting runtime/image could take more than 3 retries to start up or is that case caught somewhere else?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services