Allon Mureinik has posted comments on this change.
Change subject: core:Replace vm id with number of vms in views.
......................................................................
Patch Set 5: I would prefer that you didn't submit this
(11 inline comments)
Like the idea, have some implementation comments.
Also - did you test all the flows here?
this is an uber-change...
....................................................
File backend/manager/dbscripts/create_views.sql
Line 21: CREATE OR REPLACE VIEW vm_count_for_device_view
Note this view serves for all devices, not only disks.
is this intentional?
Line 24: FROM vm_static JOIN vm_device ON vm_static.vm_guid = vm_device.vm_id
I'd start the JOIN clause in a new line - it's more readable.
Line 25: GROUP BY device_id, entity_type;
my instinct is to first group by device_id, and only then join it to vm_static,
so you save grouping on the entity_type, which is meaningless.
Adding emesika to the reviewers list.
Eli - your feedback on this issue would be appreciated.
....................................................
File backend/manager/dbscripts/storages_sp.sql
Line 522: from images_storage_domain_view JOIN vm_device ON
vm_device.device_id = images_storage_domain_view.disk_id
please start the join clause on it's own line.
Line 527: from images_storage_domain_view JOIN vm_device ON
vm_device.device_id = images_storage_domain_view.disk_id
here too.
Line 537: JOIN vm_device ON
vm_device.device_id = vm_images_view.disk_id
here too.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddImageFromScratchCommand.java
Line 50
shouldn't you set the vm count to be 0 then?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmAndCloneImageCommand.java
Line 143
shouldn't you set the vm count to be 1 then?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 86: private final List<Guid> imageGuidList = new ArrayList<Guid>();
I'm not sure what is the merit of this final modifier here, but in any event,
it's unrelated to this patch, which isn't exactly small as it is ;)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 158: private void setVmTemplateIdParameter() {
I'm not sure I understand this method.,
Can you explain?
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DiskDaoTest.java
Line 134: assertEquals("There should be only three attachable disks",
3, disks.size());
Nice catch.
Consider separating this to it's own patch - it's unrelated and this patchset
is huge as it is.
--
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: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[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]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches