bw_usage_update makes an unnecessary query
Bug #1036084 reported by
Chris Behrens
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Behrens |
Bug Description
bw_usage_update() in sqlalchemy api always does a select before doing an update or create. It needn't do this. It could just try to update and if 0 rows are updated, then create an entry. In the most common case (updating an existing row), this will result in 1 DB query vs 2.
Changed in nova: | |
importance: | Undecided → Medium |
assignee: | nobody → Chris Behrens (cbehrens) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → folsom-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-3 → 2012.2 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/11267
Review: https:/