
Maor Lipchuk has submitted this change and it was merged. Change subject: core: RemoveImageDisk - race when updating snapshots ovf (#828192) ...................................................................... core: RemoveImageDisk - race when updating snapshots ovf (#828192) https://bugzilla.redhat.com/show_bug.cgi?id=828192 When removing an image disk it should be removed from all the snapshots that contain it. The removal from the vm snapshots includes an update to the snapshot ovf (saved in the DB). The update is a read-update-write operation, so when two or more disks are removed from the same snapshot a race condition might occur. This patch adds a lock on the snapshot when performing the operations on the snapshot ovf to prevent the race condition. Change-Id: Iccb44f1aa9d204477955343167133849a4146753 Signed-off-by: Liron Aravot <laravot@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/locks/LockingGroup.java 2 files changed, 80 insertions(+), 36 deletions(-) Approvals: Maor Lipchuk: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/7482 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iccb44f1aa9d204477955343167133849a4146753 Gerrit-PatchSet: 22 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Ayal Baron <abaron@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Daniel Paikov <paikov@gmail.com> Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: Michael Kublin <mkublin@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server