Maor Lipchuk has posted comments on this change.

Change subject: core: errors during preview of diskless snapshots
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
Line 139:                         getVm(),
Line 140:                         getCompensationContext());
Line 141:                 
snapshotsManager.addActiveSnapshot(newActiveSnapshotId, getVm(), 
getCompensationContext());
Line 142:                 
snapshotsManager.removeAllIllegalDisks(previousActiveSnapshotId, 
getVm().getId());
Line 143:                 // if there are no images we can should restore the 
config now so it'll be executed within the transaction.
1. /s/can/
 2. Please add that when there are no images we don't need to use compensation 
for state changed since we execute all in one transaction.
Line 144:                 if (!images.isEmpty()) {
Line 145:                     getCompensationContext().stateChanged();
Line 146:                 } else {
Line 147:                     restoreVmConfigFromSnapshot();


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
Line 251: 
Line 252:     public static void updateDisksFromDb(VM vm) {
Line 253:         List<Disk> imageList = 
DbFacade.getInstance().getDiskDao().getAllForVm(vm.getId());
Line 254:         vm.getDiskList().clear();
Line 255:         vm.getDiskMap().clear();
Please check if adding new disk for empty VM will not cause NPE for diskList.
Line 256:         updateDisksForVm(vm, imageList);
Line 257:     }
Line 258: 
Line 259:     public static void updateDisksForVm(VM vm, List<? extends Disk> 
diskList) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e8edc74bc34676f526dfd24d2f89eb60d8acf2e
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to