Skip to content

Commit aea3a88

Browse files
bdoyle0182Brendan Doyle
andauthored
Update FPC invoker health reporting logic (#5464)
* update FPC invoker health logic * fix scalafmt --------- Co-authored-by: Brendan Doyle <[email protected]>
1 parent e20ab17 commit aea3a88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/FPCPoolBalancer.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,10 @@ class FPCPoolBalancer(config: WhiskConfig,
627627
val missingHealths =
628628
if (healthsFromEtcd.isEmpty) Set.empty[InvokerHealth]
629629
else
630-
((0 to healthsFromEtcd.maxBy(_.id.toInt).id.toInt).toSet -- healthsFromEtcd.map(_.id.toInt))
630+
((healthsFromEtcd
631+
.minBy(_.id.toInt)
632+
.id
633+
.toInt to healthsFromEtcd.maxBy(_.id.toInt).id.toInt).toSet -- healthsFromEtcd.map(_.id.toInt))
631634
.map(id => new InvokerHealth(InvokerInstanceId(id, Some(id.toString), userMemory = 0 MB), Offline))
632635
(healthsFromEtcd ++ missingHealths) sortBy (_.id.toInt)
633636
}

0 commit comments

Comments
 (0)