Previously, when calling StackResource._validate_nested_resources() (which
we do whenever we create or update a nested stack), we would load the
nested stack into memory to validate the number of resources in the nested
stack, unless the max_resources_per_stack config option was set to -1. This
meant we would load the nested stack into memory in the same engine as the
parent on every update.
To reduce the memory high-water mark, fetch the information we need over
RPC from another engine instead.
To ensure this is only called once, move the call into the validate code.
(Previously it was called again in the create/update itself.)
Reviewed: https:/ /review. openstack. org/529715 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=e5707618f3a 5cf22e2f4260ed1 aa64b598d3a941
Committed: https:/
Submitter: Zuul
Branch: master
commit e5707618f3a5cf2 2e2f4260ed1aa64 b598d3a941
Author: Zane Bitter <email address hidden>
Date: Mon Jan 8 17:23:12 2018 -0500
Avoid always loading nested stack on update
Previously, when calling StackResource. _validate_ nested_ resources( ) (which per_stack config option was set to -1. This
we do whenever we create or update a nested stack), we would load the
nested stack into memory to validate the number of resources in the nested
stack, unless the max_resources_
meant we would load the nested stack into memory in the same engine as the
parent on every update.
To reduce the memory high-water mark, fetch the information we need over
RPC from another engine instead.
To ensure this is only called once, move the call into the validate code.
(Previously it was called again in the create/update itself.)
Change-Id: I78d12ecc8240c6 97e26893ae2d717 2b60883fb93
Partial-Bug: #1731349