Change in ovirt-engine[master]: core: avoid deadlocks on images related updated

Allon Mureinik has submitted this change and it was merged. Change subject: core: avoid deadlocks on images related updated ...................................................................... core: avoid deadlocks on images related updated Currently VdsUpdateRuntimeInfo updates the disc_image_dynamic table according to the statistics retreived from the running vms. Those updates are executed in a batchUpdate call, which currently executes all the updates within the same transaction, as there is a FK between the disk_image_dynamic on postgres version earlier than 9.3 a lock will be taken on the referenced row which means that any other concurrent operation on those images may cause to a deadlock unless they are sorted. Sorting the images on all the flows in more tricky and unneeded as this issue has been resolved in postgres 9.3 (http://www.postgresql.org/docs/9.3/static/release-9-3.html) in the meanwhile we can drop the fk constraint and delete the records by adding trigger. Change-Id: Ifa160402787a7902169ab5fd3ce6661918fdebb2 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112720 Signed-off-by: Liron Aravot <laravot@redhat.com> --- A packaging/dbscripts/upgrade/03_05_0730_drop_disk_image_dynamic_fk.sql 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Allon Mureinik: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/29136 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa160402787a7902169ab5fd3ce6661918fdebb2 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: automation@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
amureini@redhat.com