Daniel Erez has submitted this change and it was merged. Change subject: core: deadlock and unneeded db/vdsm calls when creating diskless snapshots. ......................................................................
core: deadlock and unneeded db/vdsm calls when creating diskless snapshots. This patch removes uneeded vdsm and db calls in case of an diskless snapshots and also solves a occuring deadlock. 1. No need to call endSuccesfully method when creating diskless snapshots at the moment, the call to endSuccesfully can perform uneeded vdsm call if the VM is running. 2. When creating diskless snapshot, a new transaction is opened within endSuccesfully, calling endSuccesfully in case that we already run in transaction will cause that we won't see newly added data from the new transaction and FK caused deadlock in the db, as a new snapshot that references a vm is inserted(acquires FK db lock on the vm row) and later on we try to update the same row from the newly created transaction thus creating a deadlock. Change-Id: I2ca72a2b7b881827493ddec5c53bd2c485a74084 Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java 2 files changed, 25 insertions(+), 11 deletions(-) Approvals: Daniel Erez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/10857 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ca72a2b7b881827493ddec5c53bd2c485a74084 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches