Alissa Bonas has posted comments on this change.

Change subject: core: TrybackToAllSnapshots vmDown validation
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
Line 207: 
Line 208:         Snapshot snapshot = 
getSnapshotDao().get(getParameters().getDstSnapshotId());
Line 209:         SnapshotsValidator snapshotsValidator = new 
SnapshotsValidator();
Line 210:         VmValidator vmValidator = new VmValidator(getVm());
Line 211:         result = result && 
validate(snapshotsValidator.vmNotDuringSnapshot(getVmId()))
I know it's not part of your change, but result here is always true - why doing 
here result&&... ? if you agree, pls remove it from the condition.
Also, perhaps worth to put the "vmDown" check as first check in condition 
because it seems the most fast and efficient check - if it's down, then it's 
not during snapshot which is currently the first check .
Line 212:                 && 
validate(snapshotsValidator.snapshotExists(snapshot))
Line 213:                 && 
validate(snapshotsValidator.snapshotNotBroken(snapshot))
Line 214:                 && validate(vmValidator.vmDown());
Line 215: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5f8fa014e73e6f10693edd1e4ccff4656d50053b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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