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

Bug #854239 reported by Chris Behrens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
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)
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.