Liron Ar has posted comments on this change.
Change subject: engine: Do not add disk in snapshot preview
......................................................................
Patch Set 5: Looks good to me, but someone else must approve
(1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 128: if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) !=
null) {
Line 129: return
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE);
Line 130: }
Line 131:
Line 132: if (getVm() != null && !(isVmNotInPreviewSnapshot() &&
isVmNotLocked())) {
can you just change the order of the checks? it will eliminate further db
queries (isVmNotInPreviewSnapshot()/isVmNotLocked()) - as the vm is already
fetched in getVM()
Line 133: return false;
Line 134: }
Line 135:
Line 136: return true;
--
To view, visit http://gerrit.ovirt.org/13327
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibfde0540f1d77456ed1412b015a0963f4682039f
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Libor Spevak <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Libor Spevak <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches