ningyougang commented on code in PR #5228:
URL: https://github.com/apache/openwhisk/pull/5228#discussion_r865664944
##########
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala:
##########
@@ -561,6 +561,20 @@ class MemoryQueue(private val etcdClient: EtcdClient,
// let QueueManager know this queue is no longer in charge.
context.parent ! staleQueueRemovedMsg
+ if (queue.size > 0) {
+ // if doesn't exist old container to pull old memoryQueue's
activation, complete the activation directly
+ if (containers.size == 0) {
Review Comment:
Regarding `I think we need to consider containers being created(in-progress
containers).`
I think have no need to consider in-progress containers during action update
in this case, because
* Normally, the in-progress containers will be failed due to version not
matched:
https://github.com/apache/openwhisk/blob/master/core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/ContainerMessageConsumer.scala#L85
* if above #L85 codes happens, has a option to create container using latest
version of action, but if we do this, the new version container can't fetch the
old version memoryQueue's stale activation as well.
So here, i think just consider `if (containers.size == 0)` is enough.
Regarding
```
And it's worth discussing but IIRC, in our downstream, we decided to promote
the old version of activations to the latest one rather than just completing
them with errors.
If we do this, I think QueueManager should act in the same way for stale
activations.
```
when this case happens and have no existing old version container, just send
the stale activation to queueManager to schedule to new version memoryQueue,
and the activations will be fetched by new version container.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]