Skip to content

Commit 9371d62

Browse files
authored
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
1 parent 54564cb commit 9371d62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/QueueManager.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ class QueueManager(
184184
}
185185

186186
case RecoverQueue(msg, action, actionMetaData) =>
187-
QueuePool.keys.find(_.docInfo.id == action.toDocId) match {
187+
QueuePool.keys.find(k =>
188+
k.invocationNamespace == msg.user.namespace.name.asString && k.docInfo.id == action.toDocId) match {
188189
// a newer queue is created, send msg to new queue
189190
case Some(key) if key.docInfo.rev >= msg.revision =>
190191
QueuePool.get(key) match {
@@ -326,7 +327,8 @@ class QueueManager(
326327

327328
private def handleCycle(msg: ActivationMessage)(implicit transid: TransactionId): Unit = {
328329
val action = msg.action
329-
QueuePool.keys.find(_.docInfo.id == action.toDocId) match {
330+
QueuePool.keys.find(k =>
331+
k.invocationNamespace == msg.user.namespace.name.asString && k.docInfo.id == action.toDocId) match {
330332
// a newer queue is created, send msg to new queue
331333
case Some(key) if key.docInfo.rev >= msg.revision =>
332334
QueuePool.get(key) match {

0 commit comments

Comments
 (0)