Change in ovirt-engine[master]: core: remove read lock of template while creating VM from it

Michael Kublin has submitted this change and it was merged. Change subject: core: remove read lock of template while creating VM from it ...................................................................... core: remove read lock of template while creating VM from it This patch is using the new mechanism that let us run commands without release their lock at the end of the sync execution part, in order to remove the unnecessary read lock of template while we create VM that is based on this template. so with this patch, it is now possible to create multiple VMs that are based on the same template with preallocated disks in parallel, which wasn't possible before. The AddVmFromTemplate command was modified in such a way that it won't lock the template in the DB. instead, we take a shared-lock for the whole execution process (sync + async, until the command is finished). The call to "freeLock" in AddVmCommand#executeVmCommand was also removed, so that the shared lock would not be released. it seems that this call was not required for the AddVmCommand (because it is set to release the lock at the end of this method anyway) and not for the commands that inherit it. Change-Id: If1b74347110c468b90e75b4dc6470595576f94f4 Bug-Url: https://bugzilla.redhat.com/815642 Signed-off-by: Arik Hadas <ahadas@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java 2 files changed, 3 insertions(+), 17 deletions(-) Approvals: Michael Kublin: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/12407 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1b74347110c468b90e75b4dc6470595576f94f4 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Michael Kublin <mkublin@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzaslavs@redhat.com>
participants (1)
-
mkublin@redhat.com