Change in ovirt-engine[master]: core: RemoveImageDisk - race when updating snapshots ovf (#8...

mlipchuk at redhat.com mlipchuk at redhat.com
Sun Sep 2 13:06:37 UTC 2012


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 at 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 at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Daniel Paikov <paikov at gmail.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list