bdoyle0182 commented on code in PR #5287:
URL: https://github.com/apache/openwhisk/pull/5287#discussion_r1109101046


##########
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala:
##########
@@ -930,8 +930,16 @@ class MemoryQueue(private val etcdClient: EtcdClient,
       if (averageDurationBuffer.nonEmpty) {
         averageDuration = Some(averageDurationBuffer.average)
       }
+
       getUserLimit(invocationNamespace).andThen {
-        case Success(limit) =>
+        case Success(namespaceLimit) =>
+          // extra safeguard to use namespace limit if action limit exceeds 
due to namespace limit being lowered
+          // by operator after action is deployed
+          val actionLimit = actionMetaData.limits.containerConcurrency
+            .map(limit =>
+              if (limit.maxConcurrentContainers > namespaceLimit) 
ContainerConcurrencyLimit(namespaceLimit) else limit)
+            .getOrElse(ContainerConcurrencyLimit(namespaceLimit))

Review Comment:
   Yep. I will get to cleaning up and renaming. Will let you know when I'm 
ready for another look



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to