tysonnorris commented on a change in pull request #4326: Invoker backpressure
URL:
https://github.com/apache/incubator-openwhisk/pull/4326#discussion_r266976541
##########
File path:
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -98,16 +109,19 @@ class ContainerPool(childFactory: ActorRefFactory =>
ActorRef,
// their requests and send them back to the pool for rescheduling (this
may happen if "docker" operations
// fail for example, or a container has aged and was destroying itself
when a new request was assigned)
case r: Run =>
+ implicit val tid: TransactionId = r.msg.transid
// Check if the message is resent from the buffer. Only the first
message on the buffer can be resent.
val isResentFromBuffer = runBuffer.nonEmpty &&
runBuffer.dequeueOption.exists(_._1.msg == r.msg)
-
// Only process request, if there are no other requests waiting for free
slots, or if the current request is the
// next request to process
// It is guaranteed, that only the first message on the buffer is resent.
if (runBuffer.isEmpty || isResentFromBuffer) {
val createdContainer =
- // Is there enough space on the invoker for this action to be
executed.
- if (hasPoolSpaceFor(busyPool, r.action.limits.memory.megabytes.MB)) {
+ // Is there enough space on the invoker (or the cluster manager) for
this action to be executed.
+ if (poolConfig.clusterManagedResources || hasPoolSpaceFor(
Review comment:
all of the `if poolConfig.clusterManagedResources` should be refactored to
use `resourceManager.<some function>`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services