File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -456,6 +456,9 @@ class MemoryQueue(private val etcdClient: EtcdClient,
456
456
457
457
// This is not supposed to happen. This will ensure the queue does not run forever.
458
458
// This can happen when QueueManager could not respond with QueueRemovedCompleted for some reason.
459
+ // Note: Activation messages can be received while waiting to timeout which resets the state timeout.
460
+ // Therefore the state timeout must be set externally on transition to prevent the queue stuck waiting
461
+ // to remove forever cycling activations between the manager and this fsm.
459
462
case Event (StateTimeout , _ : NoData ) =>
460
463
context.parent ! queueRemovedMsg
461
464
@@ -677,6 +680,8 @@ class MemoryQueue(private val etcdClient: EtcdClient,
677
680
case Uninitialized -> _ => unstashAll()
678
681
case _ -> Flushing => startTimerWithFixedDelay(" StopQueue" , StateTimeout , queueConfig.flushGrace)
679
682
case Flushing -> _ => cancelTimer(" StopQueue" )
683
+ case _ -> Removed => startTimerWithFixedDelay(" RemovedQueue" , StateTimeout , queueConfig.stopGrace)
684
+ case Removed -> _ => cancelTimer(" RemovedQueue" ) // Removed state is a sink so shouldn't be able to hit this.
680
685
}
681
686
682
687
onTermination {
You can’t perform that action at this time.
0 commit comments