From Tal Nisan <tnisan(a)redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: engine: remove snapshots table constraints
......................................................................
engine: remove snapshots table constraints
The RestoreAllSnapshotsCommand is a transactive command.
As part of the flow, first the snapshot entry is locked, then if
needed memory volumes will be deleted.
However, the RemoveDiskCommand is a non-transactive command and when
it will try to delete the memory disk, it will need to update also
the snapshot row that contains the memory disk id.
But since that the snapshot row is already locked by the first
command, the RemoveDiskCommand will fail to get the lock.
This patch remove the constraints between the base_disks and the
snapshots.
A better solution is to make RestoreAllSnapshotsCommand a
non-transactive command, and add compensation logic.
Also, newer version of Postgres will permit better locking, avoiding
this situation.
Bugs:
BZ 1454823:
Restore the constraints after upgrading the Postgres version.
BZ 1454830:
Make RestoreAllSnapshotsCommand non-transactive command and add
compensation logic
Change-Id: Iffc45d2ef28b65894504e49f6e966c81c4a16c3f
Bug-Url:
https://bugzilla.redhat.com/1427104
Signed-off-by: Fred Rolland <frolland(a)redhat.com>
---
A packaging/dbscripts/upgrade/04_02_0270_drop_memory_snapshot_constraints.sql
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved; Passed CI tests
Allon Mureinik: Looks good to me, but someone else must approve
Freddy Rolland: Verified
--
To view, visit
https://gerrit.ovirt.org/77195
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iffc45d2ef28b65894504e49f6e966c81c4a16c3f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik(a)redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>