Comment 22 for bug 1719333

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/533047
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3cd84afcfc71ad41dceb15619a3c89ce21db605c
Submitter: Zuul
Branch: master

commit 3cd84afcfc71ad41dceb15619a3c89ce21db605c
Author: Zane Bitter <email address hidden>
Date: Thu Jan 11 20:11:04 2018 -0500

    Cache the TemplateResource reference ID like an attribute

    TemplateResources can have their reference ID defined by an OS::stack_id
    output in the template. However getting it - or just checking that it even
    exists - is very expensive, and it happens virtually every time we load the
    stack in memory for any reason.

    Since when the output is present the reference ID is also available as an
    attribute, simply cache it in the database as if it were an attribute
    regardless of whether the output exists. Once it is in the cache,
    subsequent accesses will be cheap just like they are for attributes.

    Keep previous performance optimisations in place as well, since attributes
    are not stored in the database in the legacy path (so legacy stacks don't
    benefit from this change), and since the cache does get invalidated e.g. on
    every stack update.

    Change-Id: Ib9cd0aa40d377ec227754e386e02f185fd871909
    Closes-Bug: #1742847
    Related-Bug: #1719333