From 9371d6290136b37a24bbb32a9ef50ff816e9211d Mon Sep 17 00:00:00 2001 From: Dominic Kim Date: Mon, 14 Aug 2023 09:59:13 +0900 Subject: [PATCH] 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 --- .../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 {