Change in ovirt-engine[master]: restapi: Optimization of DB access in REST GET vms

ahadas at redhat.com ahadas at redhat.com
Mon May 16 10:08:27 UTC 2016


Arik Hadas has submitted this change and it was merged.

Change subject: restapi: Optimization of DB access in REST GET vms
......................................................................


restapi: Optimization of DB access in REST GET vms

Number of DB queries for getting graphics devices within
a REST GET VMS List call is constant (2).
It was linear with the count of VMs before.

New GetGraphicsDevicesMultipleQuery is added.
The GetVmDeviceByTypeAndDevice stored procedure supports filtering
and the result set is filtered on the given UUID[] vm_ids list.

Index on vm_device 'type,device,alias' is added.

Change-Id: I9040c0790f5b10860fbdfed6ba6e1667e5901d83
Bug-Url: https://bugzilla.redhat.com/1268216
Signed-off-by: Marek Libra <mlibra at redhat.com>
---
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetGraphicsDevicesMultipleQuery.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDeviceDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDeviceDaoImpl.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/DisplayHelper.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmsResourceTest.java
A packaging/dbscripts/upgrade/04_00_0640_add_index_on_vm_device.sql
M packaging/dbscripts/vm_device_sp.sql
9 files changed, 160 insertions(+), 15 deletions(-)

Approvals:
  Eli Mesika: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Marek Libra: Verified
  Arik Hadas: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/50658
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9040c0790f5b10860fbdfed6ba6e1667e5901d83
Gerrit-PatchSet: 21
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list