Federico Simoncelli has posted comments on this change.

Change subject: backend: prevent live storage migration on live snapshot failure
......................................................................


Patch Set 5:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 218:         // if the snapshot was not created in the DB
Line 219:         // the command should also be handled as a failure
Line 220:         boolean taskGroupSucceeded = createdSnapshot != null && 
getParameters().getTaskGroupSuccess();
Line 221:         boolean liveSnapshotRequired = isLiveSnapshotApplicable();
Line 222:         boolean liveSnapshotSucceeded = false;
We could use just one flag (initialized to true) but it's best practice to use 
the safer value for the initialization (false). I don't care, I can simplify it 
eventually.
Line 223: 
Line 224:         if (taskGroupSucceeded) {
Line 225:             getSnapshotDao().updateStatus(createdSnapshot.getId(), 
SnapshotStatus.OK);
Line 226: 


Line 305:      *
Line 306:      * @param snapshot
Line 307:      *            Snapshot to revert to being active, in case of 
rollback.
Line 308:      */
Line 309:     protected boolean performLiveSnapshot(final Snapshot snapshot) {
I'm not extremely proud of this. I wouldn't mind moving the code inside 
endVmCommand.
Line 310:         try {
Line 311:             
TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new 
TransactionMethod<Void>() {
Line 312:                 @Override
Line 313:                 public Void runInTransaction() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7c69f663836e74691c968f4a15c5f3012479a8b0
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
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