Here's the related PR containing the action migration script: https://github.com/apache/incubator-openwhisk/pull/2938.
From: "James W Dubee" <[email protected]> To: [email protected] Date: 11/17/2017 03:21 PM Subject: Controller Memory Pressure Hello all, In order to reduce the amount of memory used within the controller, we plan to store action code as attachments in the associated CouchDB documents instead of inlining the code directly in action documents. Doing so will allow the controller to not fetch action code from the database when an action is invoked. Code associated with actions can be fairly large or there may be several thousands of actions being invoked at any given time in a system. Given this situation, not fetching action code or storing it in the cache when it is not needed will help prevent memory pressure on the controller. Currently only the code associated with Java actions is stored as document attachments. For all of the other runtime kinds, action code is inlined in the action document. Allowing all action code to be stored as attachments will normalize how action code is saved amongst different runtime kinds. The cost of fully supporting all action code as attachments is that existing databases will have to be updated in order to migrate existing actions to the new schema. We will provided a script that will assist in the action schema migration process. While it is preferable from a performance perspective to migrate existing databases, the controller will still function as it does today with the old schema. In the event that an existing database is not migrated, new or updated actions will still use the new action schema. Regards, James Dubee
