This change stores the rsrc_metadata locally when the Resource object
is created so that the database is not queried every time
metadata_get is called. There are some instances where the metadata
must come from the database (eg, polling for waitcondition signal) so
an optional refresh arg is added to metadata_get to force a database
refresh of the stored rsrc_metadata.
This results in one less sql query for every time metadata_get is called,
which will help the optimising effort for
Related-Bug: #1306743
Reviewed: https:/ /review. openstack. org/89737 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=65c6c3bac87 4a6f97885489594 3c15c15eb542e3
Committed: https:/
Submitter: Jenkins
Branch: master
commit 65c6c3bac874a6f 978854895943c15 c15eb542e3
Author: Steve Baker <email address hidden>
Date: Wed Apr 23 14:49:25 2014 +1200
Do not query database for every metadata_get
This change stores the rsrc_metadata locally when the Resource object
is created so that the database is not queried every time
metadata_get is called. There are some instances where the metadata
must come from the database (eg, polling for waitcondition signal) so
an optional refresh arg is added to metadata_get to force a database
refresh of the stored rsrc_metadata.
This results in one less sql query for every time metadata_get is called,
which will help the optimising effort for
Related-Bug: #1306743
Change-Id: Iad2d810c299347 ae3b6a4a8329bbd 314ee4b5c16