ningyougang commented on a change in pull request #4917:
URL: https://github.com/apache/openwhisk/pull/4917#discussion_r505127738
##########
File path:
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
##########
@@ -305,6 +308,13 @@ class ContainerPool(childFactory: ActorRefFactory =>
ActorRef,
case RescheduleJob =>
freePool = freePool - sender()
busyPool = busyPool - sender()
+ case message: ByteSizeMessage =>
+ logging.info(
+ this,
+ s"user memory is reconfigured from ${latestUserMemory.toString} to
${message.userMemory.toString}")
+ latestUserMemory = message.userMemory
+ case UserMemoryQuery =>
+ sender() ! latestUserMemory.toString
Review comment:
hm..
When we want to change invoker's user memory, in this pr, need to send the
request to controller, there has one benefit that can modfiy many invoker's
user memory with one request only. e.g.
```
curl -u admin:admin -X POST http://xxx.xxx.xxx.xxx:10001/config/memory -d '
[
{"invoker":0,"memory": "20480 MB"},
{"invoker":1,"memory": "10240 MB"}
{"invoker":2,"memory": "51200 MB"}
]
'
```
if send `change invoker user memory` request to invokerServer, if want to
modify many invokers's user memory, need to send http request many times.
----------------------------------------------------------------
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:
[email protected]