Michael Kublin has posted comments on this change.

Change subject: core: add locks to VmTemplate commands (#761515)
......................................................................


Patch Set 5: (1 inline comment)

Additional comment at patch set 5

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
Line 49:     @Override
Line 50:     protected void ExecuteVmCommand() {
Line 51:         super.ExecuteVmCommand();
Line 52:         // override template id to blank
Line 53:         getParameters().OriginalTemplate = getVm().getvmt_guid();
a lock is freed inside super.ExecuteVmCommand(); , it is means that status of 
entity in DB is changed after, the race is left
Line 54:         
VmTemplateHandler.lockVmTemplateInTransaction(getParameters().OriginalTemplate, 
getCompensationContext());
Line 55:         getVm().setvmt_guid(VmTemplateHandler.BlankVmTemplateId);
Line 56:         
getVm().getStaticData().setQuotaId(getParameters().getVmStaticData().getQuotaId());
Line 57:         
DbFacade.getInstance().getVmStaticDAO().update(getVm().getStaticData());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d5b6518bbf19077ae5822b9359a6147c87d0f46
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <lara...@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: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to