Convergence doubles up on DB writes for resource locks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Crag Wolfe |
Bug Description
Every resource operation requires two database writes - one when the Resource status is set to IN_PROGRESS, and another when it is set to COMPLETE (or FAILED). Convergence introduced the concept of a lock on a Resource, which was designed to be stored in the Resource table (rather than the StackLock table or something equivalent) explicitly so that the lock/unlock could piggy-back on these two writes and avoid increasing the volume of DB writes required. (Convergence is already pretty hard on the database due to the number of reads.)
Unfortunately, the actual implementation does not take advantage of the architecture, and instead does separate writes to lock, set IN_PROGRESS, set COMPLETE/FAILED, and unlock. (See the Resource.lock() context manager.) Thus we are doing twice as many writes to the DB as we need.
Changed in heat: | |
milestone: | pike-1 → pike-2 |
Fix proposed to branch: master /review. openstack. org/431347
Review: https:/