Change in ovirt-engine[ovirt-engine-4.1]: core: Register OVF_STORE disk at the end of the transaction.
Code Review
gerrit at ovirt.org
Sun May 21 09:15:40 UTC 2017
>From Tal Nisan <tnisan at redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: core: Register OVF_STORE disk at the end of the transaction.
......................................................................
core: Register OVF_STORE disk at the end of the transaction.
It appears that in some of the postgresql server versions (9.2.18 for
example) a dead lock might occur when attaching a storage domain
that gets upgraded (For example from V3 to V4).
the reason for this dead lock is that AttachStorageDomainToPoolCommand
creates a new transaction and updates the format version
of the storage domain.
As part of this transaction it also calls RegisterDiskCommand
to register the OVF_STORE disks of the storage doman,
RegisterDiskCommand also opens a new transaction and tries
to insert data into image_storage_domain_map table.
Because the new thread in RegisterDiskCommand waits for the lock, which
was aquired as part of the update format, to be freed,
the engine encounters a DB dead lock.
Therefore changing the order of the actions in the trnsaction so the
register of the disks will be before the version update
should avoid this deadlock.
Change-Id: If06cf896c07077e52c71ad33daf1508b3b2c7c86
Bug-Url: https://bugzilla.redhat.com/1446878
Signed-off-by: Maor Lipchuk <mlipchuk at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/AttachStorageDomainToPoolCommand.java
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Allon Mureinik: Looks good to me, approved
Maor Lipchuk: Verified
--
To view, visit https://gerrit.ovirt.org/77000
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If06cf896c07077e52c71ad33daf1508b3b2c7c86
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list