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 2018/11/16 16:20:21 UTC

[GitHub] dubee commented on a change in pull request #4115: Don't react on Completion message of blocking requests.

dubee commented on a change in pull request #4115: Don't react on Completion message of blocking requests.
URL: https://github.com/apache/incubator-openwhisk/pull/4115#discussion_r234263408
 
 

 ##########
 File path: core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##########
 @@ -422,11 +423,12 @@ class ShardingContainerPoolBalancer(
           .foreach(_.releaseConcurrent(entry.fullyQualifiedEntityName, entry.maxConcurrent, entry.memory.toMB.toInt))
         if (!forced) {
           entry.timeoutHandler.cancel()
-          // If the action was blocking and the Resultmessage has been received before nothing will happen here.
-          // If the action was blocking and the ResultMessage is still missing, we pass the ActivationId. With this Id,
-          // the controller will get the result out of the database.
           // If the action was non-blocking, we will close the promise here.
-          entry.promise.trySuccess(Left(aid))
+          // If the action was blocking we won't close the promise with the result to the user. The ResultMessage
+          // should have arrived earlier and already resolved it. If it didn't arrive yet (what could happen if log
+          // collection is really fast and the result is very large), it will most likely arrive in a few milliseconds.
+          // If that message really got lost, the mechanism of DB-polling will take place.
+          if (!entry.blocking) entry.promise.trySuccess(Left(aid))
 
 Review comment:
   There may be a problem with the line  `activations.remove(aid)` as well.  Since the ID is removed from the activations TrieMap, the `processResult` method may not be able to find the ID when `activations.get(aid).map` is called.

----------------------------------------------------------------
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