You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/04/24 21:07:44 UTC

[GitHub] [openwhisk] tysonnorris commented on pull request #4871: Adjust prewarm container dynamically

tysonnorris commented on pull request #4871:
URL: https://github.com/apache/openwhisk/pull/4871#issuecomment-619239158


   BTW I think the `takePrewarmContainer` needs enhancement as well, so that the "oldest" prewarm is always used - otherwise, it could end up where a random but recent prewarm is taken, and then all the others suddenly expire and are removed, leaving only the min. But if we always take the oldest, then there will be more left when expiring ones are removed.
   e.g. (assuming PrewarmedData.expires is a Deadline as commented elsewhere) 
   ```
       val now = Deadline.now
       prewarmedPool
         .toSeq
         .sortBy(_._2.expires.getOrElse(now))
         .find {
         ...
   ```
   


----------------------------------------------------------------
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:
users@infra.apache.org