[GitHub] cbickel commented on a change in pull request #3451: Fix several loadbalancer bugs.

2018-03-20 Thread GitBox
cbickel commented on a change in pull request #3451: Fix several loadbalancer 
bugs.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3451#discussion_r175671605
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -247,17 +254,17 @@ class ShardingContainerPoolBalancer(config: WhiskConfig, 
controllerInstance: Ins
 
 activations.remove(aid) match {
   case Some(entry) =>
+totalActivations.decrement()
+activationsPerNamespace.get(entry.namespaceId).foreach(_.decrement())
+schedulingState.invokerSlots.lift(invoker.toInt).foreach(_.release())
 
 Review comment:
   Yes, we wanted to free up the slots earlier to avoid unnecessary overload 
situations under very high load.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cbickel commented on a change in pull request #3451: Fix several loadbalancer bugs.

2018-03-20 Thread GitBox
cbickel commented on a change in pull request #3451: Fix several loadbalancer 
bugs.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3451#discussion_r175671248
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -71,6 +72,10 @@ class ShardingContainerPoolBalancer(config: WhiskConfig, 
controllerInstance: Ins
   /** State needed for scheduling. */
   private val schedulingState = ShardingContainerPoolBalancerState()()
 
+  actorSystem.scheduler.schedule(0.seconds, 10.seconds) {
 
 Review comment:
   We took the 10 seconds interval by purpose.
   This is a value that changes every few milliseconds (depending how long the 
actions run). By sending several values and taking an average, the value, that 
will be displayed in a Dashboard later is much more accurate than a single 
snapshot which is taken only once a minute.


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:
us...@infra.apache.org


With regards,
Apache Git Services