Liron Ar has posted comments on this change.

Change subject: engine : Null Pointer Exception for action 
CreateAllSnapshotsFromVm after failure in create snapshot
......................................................................


Patch Set 6:

(1 comment)

@Yair @Allon - I think that the solution here is to change the default to 
false, i don't see any scenario in which we would want the task group success 
to be true when not all tasks were created/succeeded (BTW- are we sure that 
it's not a regression? because our revert flows rely on that)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 231:                 boolean taskGroupSucceeded = 
getParameters().getTaskGroupSuccess();
Line 232:                 Snapshot createdSnapshot = 
getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), 
SnapshotStatus.LOCKED);
Line 233:                 // if the snapshot was not created the command should 
be
Line 234:                 // handled as a failure
Line 235:                 if (createdSnapshot == null) {
1. Ravi, IMO this should be outside of the transaction, there's no need to open 
a new transaction if we already know that we won't do anything..

2. we could just return at this point
Line 236:                     taskGroupSucceeded = false;
Line 237:                 }
Line 238:                 if (taskGroupSucceeded) {
Line 239:                     
getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If89c45a236029078eae4a4254837b373c88adfd2
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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