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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to