Comment 22 for bug 1306743

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/88498
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=7383f40eb013d4188c1ae4e2f41ef4b3e6acff92
Submitter: Jenkins
Branch: master

commit 7383f40eb013d4188c1ae4e2f41ef4b3e6acff92
Author: Steve Baker <email address hidden>
Date: Fri Apr 18 15:37:08 2014 +1200

    An IO optimised method for accessing resource data

    This provides a wrapper over the db_api.resource_data_* methods that
    attempts to avoid unnecessary database calls for get operations.

    On resource create, all resource data is loaded with a single query and
    stored with the resource as a dict. Calling data_set() or data_delete()
    clears this dict so the next time data() is called all resource
    data is loaded again from the database.

    There is a future potential optimisation to prefetch the resource.data on
    resource_get_by_name_and_stack, which would result in zero resource data
    queries for a Stack.load.

    This is part of an effort to reduce the number of database queries required
    for a Stack.load operation.

    Change-Id: I2564a9f953841d895acd5b853a67aa4bc375b635
    Related-Bug: #1306743