Allon Mureinik has posted comments on this change.

Change subject: core: lock VM for whole live disk migration process
......................................................................


Patch Set 2:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 1846:     }
Line 1847: 
Line 1848:     /**
Line 1849:      * If the command has more than one task handler, we can reach 
the end action
Line 1850:      * phase and in that phase execute the next task handler. in 
that case, we
s/in/In/
Line 1851:      * don't want to release the locks, so we ask whether we're not 
in execute state.
Line 1852:      */
Line 1853:     private void freeLockEndAction() {
Line 1854:         if (getActionState() != CommandActionState.EXECUTE) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java
Line 69:      * Ugly hack, but it is needed as the endAction method in this 
command is called only
Line 70:      * once and in that case it executes the next task handler, so we 
have no other option
Line 71:      * but to release the lock right after executing the next task 
handler, assuming it'll
Line 72:      * take the VM lock by himself so we won't end up in a state where 
the VM is not locked.
Line 73:      */
why can't we just hand the lock over to the individual disk handlers?
Line 74:     @Override
Line 75:     public VdcReturnValueBase endAction() {
Line 76:         VdcReturnValueBase vdcReturnValueBase = super.endAction();
Line 77:         freeLock();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I432e9230da697a1a67c5d40e926e16215c2583ef
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@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