You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/15 18:09:39 UTC
[GitHub] markusthoemmes commented on a change in pull request #2751: Remove "Thread.sleep" from log reading retries.
markusthoemmes commented on a change in pull request #2751: Remove "Thread.sleep" from log reading retries.
URL: https://github.com/apache/incubator-openwhisk/pull/2751#discussion_r139215153
##########
File path: core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala
##########
@@ -250,8 +255,7 @@ class DockerContainer(id: ContainerId, ip: ContainerIp)(implicit docker: DockerA
if (retries > 0 && !isComplete && !isTruncated) {
logger.info(this, s"log cursor advanced but missing sentinel, trying $retries more times")
- Thread.sleep(logsRetryWait.toMillis)
- readLogs(retries - 1)
+ akka.pattern.after(logsRetryWait, as.scheduler)(readLogs(retries - 1))
Review comment:
I think it now effectively is trampolined since it's decoupled via the akka scheduler. It's not really tail-recursive though.
----------------------------------------------------------------
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