Allon Mureinik has posted comments on this change.

Change subject: core: Fix storage allocation check when merging a snapshot
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.ovirt.org/#/c/37014/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java:

Line 883:             DiskImage clone = DiskImage.copyOf(snapshot);
Line 884:             // Add the child snapshot into which the deleted snapshot 
is going to be merged to the
Line 885:             // DiskImage for StorageDomainValidator to handle
Line 886:             List<DiskImage> snapshots = 
DbFacade.getInstance().getDiskImageDao().getAllSnapshotsForParent(clone.getImageId());
Line 887:             clone.getSnapshots().clear();
> There's no setter to snapshots, yet copyOf implementation creates a shallow
Not reviewing - pending the next patch,
Line 888:             clone.getSnapshots().add(clone); // Add the clone itself 
since snapshots should contain the entire chain.
Line 889:             clone.getSnapshots().addAll(snapshots);
Line 890:             diskDummies.add(clone);
Line 891:         }


http://gerrit.ovirt.org/#/c/37014/6/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveSnapshotCommandTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveSnapshotCommandTest.java:

Line 52: public class RemoveSnapshotCommandTest {
Line 53: 
Line 54:     /**
Line 55:      * The command to test
Line 56:      */
Why change this?
Line 57:     private RemoveSnapshotCommand<RemoveSnapshotParameters> cmd;
Line 58: 
Line 59:     @Rule
Line 60:     public MockConfigRule mcr =


Line 250:     }
Line 251: 
Line 252:     /**
Line 253:      * Mocks a call to {@link 
RemoveSnapshotCommand#getSourceImages()} and returns its image guid
Line 254:      */
Why change this?
Line 255:     private Guid mockSourceImageAndGetId() {
Line 256:         return mockSourceImage().getImageId();
Line 257:     }
Line 258: 


Line 276:     }
Line 277: 
Line 278:     /**
Line 279:      * Mocks a call to {@link 
RemoveSnapshotCommand#getSourceImages()} and returns list of images
Line 280:      */
Why change this?
Line 281:     private List<DiskImage> mockMultipleSourceImagesForDomain(int 
numberOfDisks, Guid storageDomainId) {
Line 282:         List<DiskImage> disksList = new ArrayList<>(numberOfDisks);
Line 283:         for (int index = 0; index < numberOfDisks; index++) {
Line 284:             DiskImage image =createDiskImage(storageDomainId);


-- 
To view, visit http://gerrit.ovirt.org/37014
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41213884ed0ca9ddf8354ab7be58f032a6d90673
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Candace Sheremeta <csher...@redhat.com>
Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to