You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/18 19:44:49 UTC
[GitHub] tysonnorris closed pull request #3092: only consider healthy invokers when scheduling
tysonnorris closed pull request #3092: only consider healthy invokers when scheduling
URL: https://github.com/apache/incubator-openwhisk/pull/3092
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala
index be3bb0b09e..e786375b92 100644
--- a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala
+++ b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala
@@ -324,7 +324,9 @@ class LoadBalancerService(config: WhiskConfig, instance: InstanceId, entityStore
loadBalancerData.activationCountPerInvoker.flatMap { currentActivations =>
allInvokers.flatMap { invokers =>
- val invokersToUse = if (action.exec.pull) blackboxInvokers(invokers) else managedInvokers(invokers)
+ val healthyInvokers = invokers.filter(_._2 == Healthy)
+ val invokersToUse =
+ if (action.exec.pull) blackboxInvokers(healthyInvokers) else managedInvokers(healthyInvokers)
val invokersWithUsage = invokersToUse.view.map {
// Using a view defers the comparably expensive lookup to actual access of the element
case (instance, state) => (instance, state, currentActivations.getOrElse(instance.toString, 0))
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services