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 2022/11/03 05:09:52 UTC

[GitHub] [openwhisk] style95 commented on a diff in pull request #5348: Handle container cleanup from ActivationClient shutdown gracefully

style95 commented on code in PR #5348:
URL: https://github.com/apache/openwhisk/pull/5348#discussion_r1011725976


##########
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerProxy.scala:
##########
@@ -272,8 +272,7 @@ class FunctionPullingContainerProxy(
               job.rpcPort,
               container.containerId)) match {
             case Success(clientProxy) =>
-              clientProxy ! StartClient

Review Comment:
   Previously, this chaining of the future causes the timing issue.
   As a result, we needed this case.
   ```scala
       case Event(ClientCreationCompleted(proxy), _: NonexistentData) =>
         akka.pattern.after(3.milliseconds, actorSystem.scheduler) {
           self ! ClientCreationCompleted(proxy.orElse(Some(sender())))
           Future.successful({})
         }
   ```
   https://github.com/apache/openwhisk/pull/5348/files#diff-23fc1c1634cd8a2e99b4cfbf342527248a53f5987911af80ab5d910ce7864d70L341
   
   It had made the logic indeterministic and less efficient, so I refactored it.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org