Allon Mureinik has posted comments on this change.
Change subject: core: GetAllDisksBySD - fetch disks snapshots
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllDisksByStorageDomainIdQuery.java
Line 24:
Line 25: // Get active diskImages
Line 26: for (DiskImage diskImage : diskImages) {
Line 27: if (diskImage.getactive()) {
Line 28:
diskImage.getSnapshots().add(DiskImage.copyOf(diskImage));
Why use copyOf? why not just the disk itself?
Also, what is the point of making a disk a snapshot of itself?
Line 29: diskImagesMap.put(diskImage.getId(), diskImage);
Line 30: }
Line 31: }
Line 32:
Line 33: // Update diskImages' snapshots
Line 34: for (DiskImage diskImage : diskImages) {
Line 35: if (!diskImage.getactive()) {
Line 36:
diskImagesMap.get(diskImage.getId()).getSnapshots().add(diskImage);
Line 37: }
Why is this a different for loop?
Can't it be unified with the above loop?
Line 38: }
Line 39:
Line 40: getQueryReturnValue().setReturnValue(new
ArrayList<DiskImage>(diskImagesMap.values()));
Line 41: }
....................................................
Commit Message
Line 6:
Line 7: core: GetAllDisksBySD - fetch disks snapshots
Line 8:
Line 9: * GetAllDisksByStorageDomainIdQuery:
Line 10: fetch disks' snapshots for calculating actual size
s/actual/the actual/
Line 11: (DiskImage -> getActualDiskWithSnapshotsSize).
Line 12:
Line 13: * Remove redundant GetImagesByStorageId SP.
Line 14:
--
To view, visit http://gerrit.ovirt.org/11640
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I055e317ea21a9eabea126e9ca17af61db659cd10
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches