Ayal Baron has posted comments on this change.

Change subject: core: Support undoing diskless previews
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
Line 99:                     return;
Allon Mureinik          2:08 PM

If there is no need for async tasks - we call EndCommand manually (the else 
block)

If there are async tasks - the AsyncTaskManager will call EndCommand when 
they're done.

if we were unable to to create the tasks even though they are needed - the task 
returns with a fault - we should /not/ call endCommand.

Reply:

Then I'm assuming that if there are multiple such tasks, EndVmCommand takes a 
lock to prevent a race where both tasks finish at same time and think there is 
still another task running and don't perform necessary actions?

Line 107:         }
Allon Mureinik          2:08 PM

...

removeSnapshot is not a method here - I don't know what you're refering to.

Reply:
I'm referring to the "restoreSnapshot" part of the command 
restoreSnapshotAndRemoveObsoleteSnapshots (you know how much I "love" "And" 
methods, but that's besides the point and not relevant to this patch).

Line 108:         else {
Allon Mureinik          2:08 PM

Not sure I understand the question. success is initialized as false, and only 
set to true if the command succeeds.

Reply:

I'll rephrase. It is legal above to have disks, but not have any tasks to run 
(all disks are 'illegal'). In this situation we should supposedly finish 
successfully but we're not setting setSucceeded(true) and we're not calling 
EndVmCommand (and there is no task for asyncTaskManager to call EndVmAction on.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic62eee3cfb03abd21905ad6aa132c8cc10dbfb70
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to