Skip to content

Commit 5cf819e

Browse files
committed
Exclude warmed containers in disabled invokers.
1 parent d65ccf0 commit 5cf819e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/container/ContainerManager.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class ContainerManager(jobManagerFactory: ActorRefFactory => ActorRef,
167167
}
168168
}
169169

170+
// update the resource usage of invokers to apply changes from warmed creations.
170171
val updatedInvokers = chosenInvokers.foldLeft(invokers) { (invokers, chosenInvoker) =>
171172
chosenInvoker match {
172173
case Some((chosenInvoker, msg)) =>
@@ -176,6 +177,7 @@ class ContainerManager(jobManagerFactory: ActorRefFactory => ActorRef,
176177
}
177178
}
178179

180+
// handle cold creations
179181
ContainerManager
180182
.schedule(updatedInvokers, coldCreations.map(_._1), memory)
181183
.map { pair =>
@@ -185,7 +187,7 @@ class ContainerManager(jobManagerFactory: ActorRefFactory => ActorRef,
185187
creationJobManager ! RegisterCreationJob(pair.msg)
186188
sendCreationContainerToInvoker(messagingProducer, instanceId.instance, pair.msg)
187189

188-
// no matching invoker is found for the reason.
190+
// if a chosen invoker does not exist, it means it failed to find a matching invoker for the msg.
189191
case _ =>
190192
for {
191193
error <- pair.err

0 commit comments

Comments
 (0)