ningyougang commented on a change in pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#discussion_r622876853



##########
File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -91,7 +91,13 @@ class ContainerPool(childFactory: ActorRefFactory => 
ActorRef,
         .nextInt(v.toSeconds.toInt))
     .getOrElse(0)
     .seconds
-  context.system.scheduler.schedule(2.seconds, interval, self, 
AdjustPrewarmedContainer)
+  if (prewarmConfig.exists(!_.reactive.isEmpty)) {

Review comment:
       Have no need to backfill the prewarm periodically if `reactive` 
configuration is not included in `runtimes.json`, because if doesn't exist 
`reactive` in runtimes.json, the prewarm container will not be expired forever.
   
   fyi, the reactive configuration in runtimes.json like below
   ```
   ...
                   "stemCells": [
                       {
                           "initialCount": 2,
                           "memory": "256 MB",
                           "reactive": {
                               "minCount": 1,
                               "maxCount": 4,
                               "ttl": "2 minutes",
                               "threshold": 1,
                               "increment": 1
                           }
                       }
                   ]
   ...
   ```
   




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to