From 18fb70a5d3af1b919e7e63982307c0f1e177c660 Mon Sep 17 00:00:00 2001 From: Dominic Kim Date: Tue, 8 Aug 2023 06:39:09 +0900 Subject: [PATCH] Compare invocation namespaces when handling a cycle and recovering a queue --- .../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 e2857f4985e..6d0eed87566 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 {