Omer Frenkel has submitted this change and it was merged. Change subject: core: fix deadlock on update vm version ......................................................................
core: fix deadlock on update vm version When a new template version created, all vms using 'latest' of the template are updated to the new version. seems that the update of template child count inside the insertVmStatic stored procedure caused deadlock in db, because it would do select count(*) on the table, without taking any lock. in this patch the insert/delete vm static stored procedures are changed to take a lock on the template, and the update line changed to +1 / -1 instead of count(*), because of the lock, now it is safe to do. Change-Id: I2dfdb556e66658c3ef630cf71fba5f902ea26862 Signed-off-by: Omer Frenkel <ofren...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M packaging/dbscripts/vms_sp.sql 2 files changed, 11 insertions(+), 11 deletions(-) Approvals: Eli Mesika: Looks good to me, but someone else must approve Shahar Havivi: Looks good to me, approved Omer Frenkel: Verified Arik Hadas: Looks good to me, but someone else must approve -- To view, visit http://gerrit.ovirt.org/28861 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dfdb556e66658c3ef630cf71fba5f902ea26862 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Eli Mesika <elimes...@gmail.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches