Change in ovirt-engine[master]: core: retrieve vm-jobs only if needed

ahadas at redhat.com ahadas at redhat.com
Wed Jan 27 09:21:12 UTC 2016


Arik Hadas has submitted this change and it was merged.

Change subject: core: retrieve vm-jobs only if needed
......................................................................


core: retrieve vm-jobs only if needed

Previously, we queried vm-jobs from the database every time that
VMs-monitoring was executed - even when no VM reported vm-jobs.
Now, the vm-jobs are queried only if a VM reports VM-jobs.

The query is now done by VmAnalyzer instead of VmsMonitoring.

The drawback of this approach is that when we poll host with 100
running VMs, we will query the database 100 times in worse case
(when all VMs report VM-jobs) instead of only once. However, the
common case is that no VM or only a few report VM-jobs and thus
this approach is better for the common case. For the extreme case
a mechanism that caches the jobs instead of querying the database
everytime would be the best solution.

Change-Id: I2b9ee3c1bb0c6d7316a1a4f73488a550a1f994e5
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java
2 files changed, 2 insertions(+), 14 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b9ee3c1bb0c6d7316a1a4f73488a550a1f994e5
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi 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