Change in ovirt-engine[master]: core: Fix race between AsyncTaskManager and VdsManager

yzaslavs at redhat.com yzaslavs at redhat.com
Thu Aug 1 08:29:05 UTC 2013


Yair Zaslavsky has submitted this change and it was merged.

Change subject: core: Fix race between AsyncTaskManager and VdsManager
......................................................................


core: Fix race between AsyncTaskManager and VdsManager

This patch fixes a race between AsyncTaskManager and VdsManager

IrsBrokerCommand.Init fetches store pool, and initializes IrsProxyData, which
in turn calls StoragePoolUpEvent which accesses TaskManager.
But, At the same time AsyncTaskManager did not complete its initialization, so
ClassDefNotFoundException may be thrown.

The following patch fixes this by:
1. Call AsyncTaskManager initialization code before Initialization of VdsBroker (which in turn initializes
IrsProxyData)
2. Use countdown latch to wait for all asyncrhonous code inside the async task manager initialization.

After the countdown latch is being used, the state of AsyncTaskManager is valid to be used by Irs Proxy data.

Bug-Url: https://bugzilla.redhat.com/983443
Change-Id: Ibbbacef1109741ef005e33d1e4c7f4f7cc741338
Signed-off-by: Yair Zaslavsky <yzaslavs at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java
2 files changed, 28 insertions(+), 9 deletions(-)

Approvals:
  Yair Zaslavsky: Verified; Looks good to me, approved


-- 
To view, visit http://gerrit.ovirt.org/16821
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbbacef1109741ef005e33d1e4c7f4f7cc741338
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list