This is an automated email from the ASF dual-hosted git repository.

style95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 9371d6290 Compare invocation namespaces when handling a cycle and 
recovering a queue (#5432)
9371d6290 is described below

commit 9371d6290136b37a24bbb32a9ef50ff816e9211d
Author: Dominic Kim <[email protected]>
AuthorDate: Mon Aug 14 09:59:13 2023 +0900

    Compare invocation namespaces when handling a cycle and recovering a queue 
(#5432)
    
    * Compare invocation namespaces when handling a cycle and recovering a queue
    
    * Temporarily enable upterm session for debugging
    
    * Revert the upterm change
---
 .../org/apache/openwhisk/core/scheduler/queue/QueueManager.scala    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/QueueManager.scala
 
b/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/QueueManager.scala
index e2857f498..6d0eed875 100644
--- 
a/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/QueueManager.scala
+++ 
b/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/QueueManager.scala
@@ -184,7 +184,8 @@ class QueueManager(
       }
 
     case RecoverQueue(msg, action, actionMetaData) =>
-      QueuePool.keys.find(_.docInfo.id == action.toDocId) match {
+      QueuePool.keys.find(k =>
+        k.invocationNamespace == msg.user.namespace.name.asString && 
k.docInfo.id == action.toDocId) match {
         // a newer queue is created, send msg to new queue
         case Some(key) if key.docInfo.rev >= msg.revision =>
           QueuePool.get(key) match {
@@ -326,7 +327,8 @@ class QueueManager(
 
   private def handleCycle(msg: ActivationMessage)(implicit transid: 
TransactionId): Unit = {
     val action = msg.action
-    QueuePool.keys.find(_.docInfo.id == action.toDocId) match {
+    QueuePool.keys.find(k =>
+      k.invocationNamespace == msg.user.namespace.name.asString && 
k.docInfo.id == action.toDocId) match {
       // a newer queue is created, send msg to new queue
       case Some(key) if key.docInfo.rev >= msg.revision =>
         QueuePool.get(key) match {

Reply via email to