Change in ovirt-engine[master]: core: do not instantiate vm-manager when not needed

Code Review gerrit at ovirt.org
Mon Nov 14 14:13:35 UTC 2016


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas has submitted this change and it was merged.

Change subject: core: do not instantiate vm-manager when not needed
......................................................................


core: do not instantiate vm-manager when not needed

Now that the instantiation of VmManager involves a query for
the static data of a VM from the database, we should be more
careful not to make redundant instantiations.

This patch adds a machanism to retrieve the manager object
of a specific VM only if it is already instantiated. This
mechanism is used by methods that query content that is
typically contained in VmManager, but when no such object
exists, should use default values.

Change-Id: I18e5ed3da7f1d5ee1b2a987f08eec4ba8965919a
Bug-Url: https://bugzilla.redhat.com/1392209
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/ResourceManager.java
2 files changed, 18 insertions(+), 4 deletions(-)

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

Objections:
  Jenkins CI: Failed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18e5ed3da7f1d5ee1b2a987f08eec4ba8965919a
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: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list