instance_get_all_by_filters now does 2 DB queries, but they can be consolidated into 1.

Bug #854239 reported by Chris Behrens on 2011-09-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Chris Behrens

Bug Description

2nd DB query needs to go away. You can add this to the first one:

if instance_uuids:
    query_prefix = query_prefix.filter(models.Instance.uuid.in_(instance_uuids))

And then restore the old: instances = query_prefix.all() that should go right before the regexp filtering.

Related branches

Chris Behrens (cbehrens) on 2011-09-19
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-11-09
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx) on 2011-11-17
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers