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 <[email protected]> --- 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 <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Daniel Paikov <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Michael Kublin <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
