Skip to content

Commit

Permalink
Update FPC invoker health reporting logic (#5464)
Browse files Browse the repository at this point in the history
* update FPC invoker health logic

* fix scalafmt

---------

Co-authored-by: Brendan Doyle <[email protected]>
  • Loading branch information
bdoyle0182 and Brendan Doyle authored Feb 14, 2024
1 parent e20ab17 commit aea3a88
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,10 @@ class FPCPoolBalancer(config: WhiskConfig,
val missingHealths =
if (healthsFromEtcd.isEmpty) Set.empty[InvokerHealth]
else
((0 to healthsFromEtcd.maxBy(_.id.toInt).id.toInt).toSet -- healthsFromEtcd.map(_.id.toInt))
((healthsFromEtcd
.minBy(_.id.toInt)
.id
.toInt to healthsFromEtcd.maxBy(_.id.toInt).id.toInt).toSet -- healthsFromEtcd.map(_.id.toInt))
.map(id => new InvokerHealth(InvokerInstanceId(id, Some(id.toString), userMemory = 0 MB), Offline))
(healthsFromEtcd ++ missingHealths) sortBy (_.id.toInt)
}
Expand Down

0 comments on commit aea3a88

Please sign in to comment.