Arik Hadas has posted comments on this change.

Change subject: engine: Remove from host_device table the ids of vms which are 
down
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/39894/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/HostDeviceManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/HostDeviceManager.java:

Line 55: 
Line 56:         for (HostDevice hostDevice : hostDevices) {
Line 57:             Guid vmId = hostDevice.getVmId();
Line 58:             if (vmId != null) {
Line 59:                 VM vm = chachedVms.containsKey(vmId) ? 
chachedVms.get(vmId) : vmDao.get(vmId);
wouldn't querying all the VMs once be more efficient than multiple queries also 
in case there are very few VMs?
Line 60: 
Line 61:                 if (vm.isDown()) {
Line 62:                     
hostDeviceDao.setVmIdOnHostDevice(hostDevice.getId(), null);
Line 63:                 }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I728fadd7d9d4c10f905866353e07912cc55d1c9e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to