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/05/25 05:09:00 UTC

[GitHub] [openwhisk] ningyougang opened a new pull request #4911: take prewarmed container's memory as used memory

ningyougang opened a new pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911


   <!--- Provide a concise summary of your changes in the Title -->
   
   ## Description
   <!--- Provide a detailed description of your changes. -->
   <!--- Include details of what problem you are solving and how your changes are tested. -->
   Due to this pr (Adjust prewarm container dynamically): https://github.com/apache/openwhisk/pull/4871 is merged
   I think it is a good chance to add this feature: `take prewarmed container's memory as used memory`
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [ ] I signed an [Apache CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
   - [ ] I reviewed the [style guides](https://github.com/apache/openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   


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



[GitHub] [openwhisk] codecov-io edited a comment on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-761958691


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) (22db3cb) into [master](https://codecov.io/gh/apache/openwhisk/commit/2d0c8a72711cf20da4aedb8ada68d62774c0eca9?el=desc) (2d0c8a7) will **increase** coverage by `47.69%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #4911       +/-   ##
   ===========================================
   + Coverage   29.09%   76.78%   +47.69%     
   ===========================================
     Files         195      202        +7     
     Lines        9553     9820      +267     
     Branches      413      416        +3     
   ===========================================
   + Hits         2779     7540     +4761     
   + Misses       6774     2280     -4494     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `96.80% <100.00%> (+5.26%)` | :arrow_up: |
   | [...k/core/monitoring/metrics/PrometheusRecorder.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL1Byb21ldGhldXNSZWNvcmRlci5zY2FsYQ==) | `86.00% <0.00%> (ø)` | |
   | [...hisk/core/monitoring/metrics/OpenWhiskEvents.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL09wZW5XaGlza0V2ZW50cy5zY2FsYQ==) | `93.75% <0.00%> (ø)` | |
   | [...penwhisk/core/monitoring/metrics/MetricNames.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL01ldHJpY05hbWVzLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | [...nwhisk/core/monitoring/metrics/EventConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL0V2ZW50Q29uc3VtZXIuc2NhbGE=) | `89.23% <0.00%> (ø)` | |
   | [.../core/monitoring/metrics/PrometheusEventsApi.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL1Byb21ldGhldXNFdmVudHNBcGkuc2NhbGE=) | `90.90% <0.00%> (ø)` | |
   | [...nwhisk/core/monitoring/metrics/KamonRecorder.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL0thbW9uUmVjb3JkZXIuc2NhbGE=) | `82.45% <0.00%> (ø)` | |
   | [...pache/openwhisk/core/monitoring/metrics/Main.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL01haW4uc2NhbGE=) | `0.00% <0.00%> (ø)` | |
   | [...openwhisk/common/tracing/OpenTracingProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi90cmFjaW5nL09wZW5UcmFjaW5nUHJvdmlkZXIuc2NhbGE=) | `21.15% <0.00%> (+1.92%)` | :arrow_up: |
   | [...re/database/MultipleReadersSingleWriterCache.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvTXVsdGlwbGVSZWFkZXJzU2luZ2xlV3JpdGVyQ2FjaGUuc2NhbGE=) | `98.00% <0.00%> (+2.00%)` | :arrow_up: |
   | ... and [143 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [2d0c8a7...22db3cb](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] ningyougang commented on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang commented on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-641039018


   Below prs has relation with this pr
   * Adjust user memory via api: https://github.com/apache/openwhisk/pull/4917
   * Add administrative interface to invoker and controller to reconfigure runtimes https://github.com/apache/openwhisk/pull/4790
   
   `pull/4917` is `adjust userMemory` and `pull/4790` is `adjust prewarmed container`


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



[GitHub] [openwhisk] ningyougang closed pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang closed pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911


   


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



[GitHub] [openwhisk] ningyougang edited a comment on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang edited a comment on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-641039018


   Below prs has relation with current pr
   * Adjust user memory via api: https://github.com/apache/openwhisk/pull/4917
   * Add administrative interface to invoker and controller to reconfigure runtimes https://github.com/apache/openwhisk/pull/4790
   
   `pull/4917` is `adjust userMemory` and `pull/4790` is `adjust prewarmed container`


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



[GitHub] [openwhisk] style95 merged pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
style95 merged pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911


   


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



[GitHub] [openwhisk] ningyougang commented on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang commented on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-688568928


   upsteam guy: Tyson replied on dev mail list for this pr as below
   
   ```
   I agree this is a good change, but may require operators to update their configured userMemory and/or their prewarm configs
    
   to avoid unexpected problems. It might be good to add some log statements to indicate userMemory available AFTER initial 
   
   prewarm config is applied, to give some hints that userMemory seen at invoker is now lower than before with the same configs?
   ```
   Regarding ` but may require operators to update their configured userMemory and/or their prewarm configs to avoid unexpected problems.`
   Currently, below prs has been implemented with `update their configured userMemory and/or their prewarm configs`
   * Adjust user memory via api: https://github.com/apache/openwhisk/pull/4917
   * Add administrative interface to invoker and controller to reconfigure prewarm config: https://github.com/apache/openwhisk/pull/4790
   
   Regarding `It might be good to add some log statements to indicate userMemory available AFTER initial 
   prewarm config is applied, to give some hints that userMemory seen at invoker is now lower than before with the same configs?`
   Agree, i think after above two prs(pull/4917 and pull/4790) merged, i can add some logs in this pr after rebased codes.
   
   
   
   


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



[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-633391139


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) into [master](https://codecov.io/gh/apache/openwhisk/commit/1274fdf4d4a8083042666bb47e2219fc3098991d&el=desc) will **decrease** coverage by `6.09%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #4911      +/-   ##
   ==========================================
   - Coverage   83.38%   77.28%   -6.10%     
   ==========================================
     Files         201      201              
     Lines        9441     9446       +5     
     Branches      396      398       +2     
   ==========================================
   - Hits         7872     7300     -572     
   - Misses       1569     2146     +577     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `97.92% <100.00%> (+0.04%)` | :arrow_up: |
   | [...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <0.00%> (-96.23%)` | :arrow_down: |
   | [...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh) | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
   | [...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=) | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
   | [...enwhisk/connector/kafka/KamonMetricsReporter.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYW1vbk1ldHJpY3NSZXBvcnRlci5zY2FsYQ==) | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/KafkaEventProducer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0thZmthRXZlbnRQcm9kdWNlci5zY2FsYQ==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
   | [...whisk/core/database/cosmosdb/CosmosDBSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJTdXBwb3J0LnNjYWxh) | `0.00% <0.00%> (-74.08%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [1274fdf...370ddef](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] ningyougang commented on a change in pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#discussion_r485277193



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -131,9 +131,18 @@ class ContainerPool(childFactory: ActorRefFactory => ActorRef,
           //remove from resent tracking - it may get resent again, or get processed
           resent = None
         }
+        val kind = r.action.exec.kind
+        val memory = r.action.limits.memory.megabytes.MB
+
+        val prewarmedPoolForOtherKind = prewarmedPool.filter { info =>
+          info match {
+            case (_, PreWarmedData(_, `kind`, `memory`, _, _)) => false

Review comment:
       hm.. i forgot the reason why i want to `get the other kind/memory prewarmpool` ,
   but then, i feel use `prewarmedPool` directly is more nature, already updated.




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



[GitHub] [openwhisk] style95 commented on a change in pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
style95 commented on a change in pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#discussion_r484841048



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -131,9 +131,18 @@ class ContainerPool(childFactory: ActorRefFactory => ActorRef,
           //remove from resent tracking - it may get resent again, or get processed
           resent = None
         }
+        val kind = r.action.exec.kind
+        val memory = r.action.limits.memory.megabytes.MB
+
+        val prewarmedPoolForOtherKind = prewarmedPool.filter { info =>
+          info match {
+            case (_, PreWarmedData(_, `kind`, `memory`, _, _)) => false

Review comment:
       Why does it require filtering prewarm pool for other kinds?




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



[GitHub] [openwhisk] codecov-io edited a comment on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-761958691


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) (22db3cb) into [master](https://codecov.io/gh/apache/openwhisk/commit/2d0c8a72711cf20da4aedb8ada68d62774c0eca9?el=desc) (2d0c8a7) will **increase** coverage by `47.76%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #4911       +/-   ##
   ===========================================
   + Coverage   29.09%   76.85%   +47.76%     
   ===========================================
     Files         195      202        +7     
     Lines        9553     9820      +267     
     Branches      413      416        +3     
   ===========================================
   + Hits         2779     7547     +4768     
   + Misses       6774     2273     -4501     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `97.20% <100.00%> (+5.66%)` | :arrow_up: |
   | [...nwhisk/core/monitoring/metrics/EventConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL0V2ZW50Q29uc3VtZXIuc2NhbGE=) | `89.23% <0.00%> (ø)` | |
   | [...penwhisk/core/monitoring/metrics/MetricNames.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL01ldHJpY05hbWVzLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | [...k/core/monitoring/metrics/PrometheusRecorder.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL1Byb21ldGhldXNSZWNvcmRlci5zY2FsYQ==) | `86.00% <0.00%> (ø)` | |
   | [.../core/monitoring/metrics/PrometheusEventsApi.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL1Byb21ldGhldXNFdmVudHNBcGkuc2NhbGE=) | `90.90% <0.00%> (ø)` | |
   | [...pache/openwhisk/core/monitoring/metrics/Main.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL01haW4uc2NhbGE=) | `0.00% <0.00%> (ø)` | |
   | [...nwhisk/core/monitoring/metrics/KamonRecorder.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL0thbW9uUmVjb3JkZXIuc2NhbGE=) | `82.45% <0.00%> (ø)` | |
   | [...hisk/core/monitoring/metrics/OpenWhiskEvents.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9tb25pdG9yaW5nL3VzZXItZXZlbnRzL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbW9uaXRvcmluZy9tZXRyaWNzL09wZW5XaGlza0V2ZW50cy5zY2FsYQ==) | `93.75% <0.00%> (ø)` | |
   | [...openwhisk/common/tracing/OpenTracingProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi90cmFjaW5nL09wZW5UcmFjaW5nUHJvdmlkZXIuc2NhbGE=) | `21.15% <0.00%> (+1.92%)` | :arrow_up: |
   | [...re/database/MultipleReadersSingleWriterCache.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvTXVsdGlwbGVSZWFkZXJzU2luZ2xlV3JpdGVyQ2FjaGUuc2NhbGE=) | `98.00% <0.00%> (+2.00%)` | :arrow_up: |
   | ... and [143 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [2d0c8a7...22db3cb](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] codecov-commenter commented on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-633391139


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) into [master](https://codecov.io/gh/apache/openwhisk/commit/1274fdf4d4a8083042666bb47e2219fc3098991d&el=desc) will **decrease** coverage by `6.09%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #4911      +/-   ##
   ==========================================
   - Coverage   83.38%   77.28%   -6.10%     
   ==========================================
     Files         201      201              
     Lines        9441     9446       +5     
     Branches      396      398       +2     
   ==========================================
   - Hits         7872     7300     -572     
   - Misses       1569     2146     +577     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `97.92% <100.00%> (+0.04%)` | :arrow_up: |
   | [...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <0.00%> (-96.23%)` | :arrow_down: |
   | [...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh) | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
   | [...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=) | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
   | [...enwhisk/connector/kafka/KamonMetricsReporter.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYW1vbk1ldHJpY3NSZXBvcnRlci5zY2FsYQ==) | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/KafkaEventProducer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0thZmthRXZlbnRQcm9kdWNlci5zY2FsYQ==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
   | [...whisk/core/database/cosmosdb/CosmosDBSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJTdXBwb3J0LnNjYWxh) | `0.00% <0.00%> (-74.08%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [1274fdf...370ddef](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] codecov-io commented on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-761958691


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) (22db3cb) into [master](https://codecov.io/gh/apache/openwhisk/commit/2d0c8a72711cf20da4aedb8ada68d62774c0eca9?el=desc) (2d0c8a7) will **increase** coverage by `43.92%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #4911       +/-   ##
   ===========================================
   + Coverage   29.09%   73.01%   +43.92%     
   ===========================================
     Files         195      202        +7     
     Lines        9553     9820      +267     
     Branches      413      416        +3     
   ===========================================
   + Hits         2779     7170     +4391     
   + Misses       6774     2650     -4124     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `88.00% <100.00%> (-3.54%)` | :arrow_down: |
   | [...che/openwhisk/core/invoker/LogStoreCollector.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9Mb2dTdG9yZUNvbGxlY3Rvci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...la/org/apache/openwhisk/http/BasicRasService.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2h0dHAvQmFzaWNSYXNTZXJ2aWNlLnNjYWxh) | `16.66% <0.00%> (-83.34%)` | :arrow_down: |
   | [...a/org/apache/openwhisk/http/BasicHttpService.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2h0dHAvQmFzaWNIdHRwU2VydmljZS5zY2FsYQ==) | `3.33% <0.00%> (-75.00%)` | :arrow_down: |
   | [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `1.58% <0.00%> (-68.26%)` | :arrow_down: |
   | [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (-59.14%)` | :arrow_down: |
   | [...apache/openwhisk/core/ack/MessagingActiveAck.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL01lc3NhZ2luZ0FjdGl2ZUFjay5zY2FsYQ==) | `0.00% <0.00%> (-54.55%)` | :arrow_down: |
   | [...whisk/connector/kafka/KafkaMessagingProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYU1lc3NhZ2luZ1Byb3ZpZGVyLnNjYWxh) | `29.26% <0.00%> (-41.47%)` | :arrow_down: |
   | [.../containerpool/docker/DockerContainerFactory.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9kb2NrZXIvRG9ja2VyQ29udGFpbmVyRmFjdG9yeS5zY2FsYQ==) | `36.36% <0.00%> (-33.34%)` | :arrow_down: |
   | [...whisk/connector/kafka/KafkaProducerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYVByb2R1Y2VyQ29ubmVjdG9yLnNjYWxh) | `27.50% <0.00%> (-27.50%)` | :arrow_down: |
   | ... and [149 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [2d0c8a7...22db3cb](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] style95 commented on a change in pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
style95 commented on a change in pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#discussion_r523422840



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -131,9 +131,12 @@ class ContainerPool(childFactory: ActorRefFactory => ActorRef,
           //remove from resent tracking - it may get resent again, or get processed
           resent = None
         }
+        val kind = r.action.exec.kind
+        val memory = r.action.limits.memory.megabytes.MB
+
         val createdContainer =
           // Is there enough space on the invoker for this action to be executed.
-          if (hasPoolSpaceFor(busyPool, r.action.limits.memory.megabytes.MB)) {
+          if (hasPoolSpaceFor(busyPool ++ prewarmedPool, memory)) {

Review comment:
       I feel this needs proper documentation.
   




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



[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-633391139


   # [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=h1) Report
   > Merging [#4911](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=desc) into [master](https://codecov.io/gh/apache/openwhisk/commit/1274fdf4d4a8083042666bb47e2219fc3098991d&el=desc) will **decrease** coverage by `6.09%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/openwhisk/pull/4911/graphs/tree.svg?width=650&height=150&src=pr&token=l0YmsiSAso)](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #4911      +/-   ##
   ==========================================
   - Coverage   83.38%   77.28%   -6.10%     
   ==========================================
     Files         201      201              
     Lines        9441     9446       +5     
     Branches      396      398       +2     
   ==========================================
   - Hits         7872     7300     -572     
   - Misses       1569     2146     +577     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh) | `97.92% <100.00%> (+0.04%)` | :arrow_up: |
   | [...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <0.00%> (-96.23%)` | :arrow_down: |
   | [...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh) | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
   | [...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=) | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
   | [...enwhisk/connector/kafka/KamonMetricsReporter.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYW1vbk1ldHJpY3NSZXBvcnRlci5zY2FsYQ==) | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
   | [...e/database/cosmosdb/cache/KafkaEventProducer.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0thZmthRXZlbnRQcm9kdWNlci5zY2FsYQ==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
   | [...whisk/core/database/cosmosdb/CosmosDBSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJTdXBwb3J0LnNjYWxh) | `0.00% <0.00%> (-74.08%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/openwhisk/pull/4911/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=footer). Last update [1274fdf...370ddef](https://codecov.io/gh/apache/openwhisk/pull/4911?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [openwhisk] ningyougang commented on a change in pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#discussion_r485277193



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -131,9 +131,18 @@ class ContainerPool(childFactory: ActorRefFactory => ActorRef,
           //remove from resent tracking - it may get resent again, or get processed
           resent = None
         }
+        val kind = r.action.exec.kind
+        val memory = r.action.limits.memory.megabytes.MB
+
+        val prewarmedPoolForOtherKind = prewarmedPool.filter { info =>
+          info match {
+            case (_, PreWarmedData(_, `kind`, `memory`, _, _)) => false

Review comment:
       hm.. i forgot the reason why i want to `get the other kind/memory prewarmpool`  :(,
   but then, i feel use `prewarmedPool` directly is more nature, already updated.




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



[GitHub] [openwhisk] style95 commented on pull request #4911: take prewarmed container's memory as used memory

Posted by GitBox <gi...@apache.org>.
style95 commented on pull request #4911:
URL: https://github.com/apache/openwhisk/pull/4911#issuecomment-761994888


   Merged as it has been around 2 months.


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