Skip to content

Commit 830da9c

Browse files
author
Brendan Doyle
committed
account for action timeout being longer than queue retention
1 parent d8a6753 commit 830da9c

File tree

1 file changed

+2
-2
lines changed
  • core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@ object MemoryQueue {
12071207
logging.info(
12081208
this,
12091209
s"[$invocationNamespace:$action:$stateName] some activations are stale msg: ${queue.head.msg.activationId}.")
1210-
val currentTime = Instant.now.toEpochMilli
1211-
if (currentTime - lastActivationExecutedTime.get() > maxRetentionMs) {
1210+
val timeSinceLastActivationGrabbed = clock.now().toEpochMilli - lastActivationExecutedTime.get()
1211+
if (timeSinceLastActivationGrabbed > maxRetentionMs && timeSinceLastActivationGrabbed > actionMetaData.limits.timeout.millis) {
12121212
MetricEmitter.emitGaugeMetric(
12131213
LoggingMarkers
12141214
.SCHEDULER_QUEUE_NOT_PROCESSING(invocationNamespace, action.asString, action.toStringWithoutVersion),

0 commit comments

Comments
 (0)