chetanmeh commented on a change in pull request #2795: enable concurrent 
activation processing
URL: 
https://github.com/apache/incubator-openwhisk/pull/2795#discussion_r218457400
 
 

 ##########
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerPool.scala
 ##########
 @@ -132,14 +133,22 @@ class ContainerPool(childFactory: ActorRefFactory => 
ActorRef,
                   .headOption
                   .map(_ =>
                     takePrewarmContainer(r.action)
-                      .map(container => (container, "recreatedPrewarm"))
-                      
.getOrElse(createContainer(r.action.limits.memory.megabytes.MB), "recreated")))
+                      .map(container => (container, "recreatedPrewarm", 
container._2.activeActivationCount))
+                      
.getOrElse(createContainer(r.action.limits.memory.megabytes.MB), "recreated", 
0)))
           } else None
 
         createdContainer match {
-          case Some(((actor, data), containerState)) =>
-            busyPool = busyPool + (actor -> data)
-            freePool = freePool - actor
+          case Some(((actor, data), containerState, activeActivations)) =>
 
 Review comment:
   I think `activeActivationCount` in `data` which is `ContainerData` == 
`activeActivations`. In that case we can avoid extracting 
`activeActivationCount` in steps before

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

Reply via email to