Michael Kublin has submitted this change and it was merged. Change subject: core: add locks to VmTemplate commands (#761515) ......................................................................
core: add locks to VmTemplate commands (#761515) https://bugzilla.redhat.com/761515 Currently the different VmTemplate commands make use of DB lock only, which causes to different race conditions (as the lock is check and only then acquired - non atomic operation). This patch adds to the different VmTemplate commands the use of in-memory lock and canDoAction() checks in order to prevent those race conditions and possible corruption. NOTE: this patch doesn't add the use of locks to the different export domain VmTemplate related commands, the reason for this is that the exported template is not present on the engine DB so a lock on that export object cannot be done. Change-Id: I2d5b6518bbf19077ae5822b9359a6147c87d0f46 Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java 5 files changed, 61 insertions(+), 46 deletions(-) Approvals: Michael Kublin: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/8013 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d5b6518bbf19077ae5822b9359a6147c87d0f46 Gerrit-PatchSet: 17 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