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/24 08:34:45 UTC

[GitHub] markusthoemmes commented on a change in pull request #4230: Complete blocking activations immediately

markusthoemmes commented on a change in pull request #4230: Complete blocking activations immediately
URL: https://github.com/apache/incubator-openwhisk/pull/4230#discussion_r250505301
 
 

 ##########
 File path: core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PrimitiveActions.scala
 ##########
 @@ -599,7 +599,8 @@ protected[actions] trait PrimitiveActions {
       case Right(activation) => result.trySuccess(Right(activation))
       case _ if (controllerActivationConfig.pollingFromDb) =>
         pollActivation(docid, context, result, i => 1.seconds + (2.seconds * i), maxRetries = 4)
-      case _ =>
+      case Left(activationId) =>
+        result.trySuccess(Left(activationId)) // complete the future immediately if it's configured to not poll db for blocking activations
 
 Review comment:
   This change is sound. This block definitely should resolve the promise on every branch in some way or the other. If database polling is disabled, the promise is essentially blackholed.
   
   A RecordTooLargeException results indeed in the fixed `Left` case, see https://github.com/apache/incubator-openwhisk/blob/7ff15502949fa21ab5621825204397ad9eb6dfe5/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/InvokerReactive.scala#L168-L171

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