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

 ##########
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerPool.scala
 ##########
 @@ -127,8 +126,11 @@ class ContainerPool(childFactory: ActorRefFactory => 
ActorRef,
 
       createdContainer match {
         case Some(((actor, data), containerState)) =>
-          busyPool = busyPool + (actor -> data)
-          freePool = freePool - actor
+          //only move to busyPool if max reached
+          if (data.activeActivationCount + 1 >= poolConfig.maxConcurrent) {
 
 Review comment:
   Don't know where to put this, so doing this here:
   
   I have one general question on the state-keeping: I think we update the 
state in the ContainerProxy asynchronously. That is, the proxy sends a 
"WarmedData" message, which we then use to update state.
   
   Do we need to "predict" that update in the ContainerPool, as in: increment 
WarmedData on scheduling locally and updating that with the "actual" value once 
the event happens from ContainerProxy?
   
   I'm mostly wondering if we otherwise have racy counting going on. Thoughts? 

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