Bug 1064312 - Pool VMs are being pulled from template view in a very inefficient way
Summary: Pool VMs are being pulled from template view in a very inefficient way
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 3.4.0
Assignee: Liran Zelkha
QA Contact: Tareq Alayan
URL:
Whiteboard: infra
Depends On:
Blocks: 1066392 rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2014-02-12 12:00 UTC by Tomas Dosek
Modified: 2019-04-28 10:06 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, an inefficient query caused virtual machine pools pulled from template view to take a long time. This resulted in the query taking longer than expected to display results. Now, an updated query has fixed the problem. As a result, virtual machine pools are displayed more quickly.
Clone Of: 1061185
: 1066392 (view as bug list)
Environment:
Last Closed: 2014-06-09 15:03:58 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:
talayan: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0506 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.4.0 update 2014-06-09 18:55:38 UTC
oVirt gerrit 24612 0 None None None Never
oVirt gerrit 24615 0 None None None Never
oVirt gerrit 24633 0 None None None Never

Comment 1 Tomas Dosek 2014-02-12 12:02:44 UTC
Same observation as with templates and events was found with pools. :(

SELECT * FROM (SELECT * FROM vm_pools_full_view WHERE ( vm_pool_id IN (SELECT vm_pools_full_view.vm_pool_id FROM  vm_pools_full_view  ))  ORDER BY vm_pool_name ASC ) as T1 OFFSET (1 -1) LIMIT 100

Comment 3 Liran Zelkha 2014-02-17 09:25:30 UTC
Hi Tomas,

I can't understand what is the bug - is it from the vm_pools table or is it audit log table?

Comment 4 Tomas Dosek 2014-02-17 09:29:26 UTC
Sorry for that I really should not have cloned the BZ from the previous one.

The inefficient query is:

SELECT * FROM (SELECT * FROM vm_pools_full_view WHERE ( vm_pool_id IN (SELECT vm_pools_full_view.vm_pool_id FROM  vm_pools_full_view  ))  ORDER BY vm_pool_name ASC ) as T1 OFFSET (1 -1) LIMIT 100

So that looks like vm_pools table/view.

Comment 5 Liran Zelkha 2014-02-18 07:09:21 UTC
Hi Tomas,

Gerrit patch released, and will be available for 3.3.z. 
Note that the fix is validated for api call - http://localhost:8080/ovirt-engine/api/vmpools, without any parameters. This is the scenario you are testing, right?

Comment 7 Sandro Bonazzola 2014-02-19 12:01:59 UTC
All patches merged.

Comment 8 Sandro Bonazzola 2014-02-19 12:05:01 UTC
Maybe one patch need to be pushed to 3.4, please check if we're missing something in 3.4, otherwise please move to modified.

Comment 9 sefi litmanovich 2014-03-10 16:59:26 UTC
Just to make sure, this bug is an upstream bug and not a z-stream right?

Comment 10 Liran Zelkha 2014-03-10 19:28:15 UTC
Yes. It has a duplicate for downstream (1066392)

Comment 11 Tareq Alayan 2014-03-18 12:34:48 UTC
is this merged to rhevm-3.4.0-0.5.master ?

Comment 12 Liran Zelkha 2014-03-18 12:43:23 UTC
These are the 3.4 tags I'm familiar with - which one do you mean?

ovirt-engine-3.4.0_beta1
ovirt-engine-3.4.0_beta2
ovirt-engine-3.4.0_beta3
ovirt-engine-3.4.0_rc1
ovirt-engine-3.4.0_rc2
ovirt-engine-3.4.0_rc3

Comment 13 Tareq Alayan 2014-03-18 13:01:56 UTC
I want to verify that this merged into the downstream 3.4  ovirt-engine-3.4.0_av3 



How can i verify that?

Comment 14 Tareq Alayan 2014-03-18 13:10:39 UTC
the fix is there and verified.

Comment 15 errata-xmlrpc 2014-06-09 15:03:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0506.html


Note You need to log in before you can comment on or make changes to this bug.