Change in ovirt-engine[master]: core: SyncLunsInfo - avoidable executions/db deadlock
laravot at redhat.com
laravot at redhat.com
Wed Aug 6 15:09:58 UTC 2014
Liron Aravot has submitted this change and it was merged.
Change subject: core: SyncLunsInfo - avoidable executions/db deadlock
......................................................................
core: SyncLunsInfo - avoidable executions/db deadlock
Currently SyncLunsInfoForBlockStorageDomainCommand is being executed
when connecting to a domain storage server. This command is resposible
to check if any of the luns of the domain were changed and in case it
did, update the DB accordingly.
When a storage domain is being activated all of it's hosts are being
connected simoltenously to the domain, which leads that
SyncLunsInfoForBlockStorageDomainCommand is executed multiple times
(once for each host) which is unneeded as it's exactly the same as
having response from one host (even if the responses of the hosts are
different, we can't decide which response is correct).
When being executed simoltenously, possibly concurrent updates from the
different threads can be made - as the order of the updates isn't
garuanteed, there's a chance for a deadlock.
This patch solves it by executes the operation for only one hosts at a
time, only in case of failure (which should be rare) the engine will
attempt to sync the luns through a different host.
Change-Id: I725964aa51ac38bf16d83cc498c5298720031632
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FCPStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/IStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
5 files changed, 40 insertions(+), 15 deletions(-)
Approvals:
Allon Mureinik: Looks good to me, approved
Liron Aravot: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/29662
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I725964aa51ac38bf16d83cc498c5298720031632
Gerrit-PatchSet: 3
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: Daniel Erez <derez at redhat.com>
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: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list