tardieu commented on a change in pull request #3202: Support action
continuations in the controller
URL:
https://github.com/apache/incubator-openwhisk/pull/3202#discussion_r165975818
##########
File path:
core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
##########
@@ -139,6 +199,356 @@ protected[actions] trait PrimitiveActions {
}
}
+ /**
+ * Mutable cumulative accounting of what happened during the execution of a
composition.
+ *
+ * Compositions are aborted if the number of action invocations exceeds a
limit.
+ * The permitted max is n component invocations plus 2n+1 conductor
invocations (where n is the actionSequenceLimit).
+ * The max is chosen to permit a sequence with up to n primitive actions.
+ *
+ * NOTE:
+ * A sequence invocation counts as one invocation irrespective of the number
of action invocations in the sequence.
+ * If one component of a composition is also a composition, the caller and
callee share the same accounting object.
+ * The counts are shared between callers and callees so the limit applies
globally.
+ *
+ * @param components the current count of component actions already invoked
+ * @param conductors the current count of conductor actions already invoked
+ */
+ private case class CompositionAccounting(var components: Int = 0, var
conductors: Int = 0)
+
+ /**
+ * A mutable session object to keep track of the execution of one
composition.
+ *
+ * NOTE:
+ * The session object is not shared between callers and callees.
+ * A callee has a reference to the session object for the caller.
+ * This permits the callee to return to the caller when done.
+ *
+ * @param activationId the activationId for the composition (ie the
activation record for the composition)
+ * @param start the start time for the composition
+ * @param action the conductor action responsible for the execution of the
composition
Review comment:
A composition is not permitted to have more than one conductor.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services