Skip to content

Commit

Permalink
Compare invocation namespaces when handling a cycle and recovering a …
Browse files Browse the repository at this point in the history
…queue
  • Loading branch information
style95 committed Aug 7, 2023
1 parent 54564cb commit 18fb70a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 18fb70a

Please sign in to comment.