Michael Kublin has posted comments on this change.
Change subject: core:Replace vm id with number of vms in views.
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(7 inline comments)
"I decided to use a view instead lazy initialization since we use the field
number_of_vms in the search and since it is already used in a view it is easily
fetched and maintained that way." - that it was before, and it easy to write it
not always a good reason, open ticket for preintegration team to check
performance impact of your change.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmTemplateImageTemplatesCommand.java
Line 76: if (diskImage != null) {
Missing
DbFacade.getInstance().getImageStorageDomainMapDao().remove(template.getImageId());
Line 79: .getVmDeviceDAO()
use null, instead getVmTemplateId()
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 146: Map<Boolean, VmTemplate> templateMap =
These comment is bad, how it helps, and if tomorrow we will have a new type of
disk?
Line 150: if (!templateMap.values().isEmpty()) {
the common way of writing these is !templateMap().isEmpty()
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Disk.java
Line 21: private VmEntityType vmEntityType;
change to int, can not be null, no any reason for Integer
Line 49: setNumberOfVms(numberOfVms);
these should be written at the following way:
this.numberOfVms = numberOfVms;
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IImage.java
Line 20
Not related to patch
--
To view, visit http://gerrit.ovirt.org/5216
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id306d8322245780ea200c10f9e96254cddf3bc76
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches