]
Brian Stansberry updated WFCORE-915:
------------------------------------
Fix Version/s: 2.2.0.CR1
Allow concurrent registration of slave host controllers
-------------------------------------------------------
Key: WFCORE-915
URL:
https://issues.jboss.org/browse/WFCORE-915
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Ken Wills
Labels: 2.2
Fix For: 2.2.0.CR1, 3.0.0.Alpha1
Registration of slave host controllers must be done with the exclusive ModelController
lock held, in order to ensure that the registering HC sees a consistent config throughout
the entire process. The drawback to this is registrations must therefore be done in
series, which is inefficient in a large domain.
We need to evaluate how this can be done in parallel, without losing the correctness
semantics. For example, have the first registration request acquire the lock, but then
don't release the lock as long as any other registrations are in progress.
The current lock acquisition mechanism based on an OperationStepHandler acquiring the
lock[1] can't do this, or at least not without having the request that acquires the
lock have to wait for final completion until all other concurrent requests complete.
(Doing that will likely cause problems due to that "unlucky" first slave not
getting the expected final response. Plus it just smells bad.)
A possibility is to remove the currrent lock acquisition in the OSH[1] and instead change
the internal HostControllerRegistrationHandler.OperationExecutor API to expose a use-case
specific method for the initial registration call.[2] The actual
HostControllerRegistrationHandler.OperationExecutor impl is DomainModelControllerService,
which is the service that installs the ModelControllerImpl and potentially has closer
access to its non-public API (i.e. the locking methods.) So DomainModelControllerService
can perhaps therefore coordinate the locking, holding the lock until all active
registrations complete.
[1]
https://github.com/wildfly/wildfly-core/blob/master/host-controller/src/m...
[2] I want to change that API anyway. See TODO at
https://github.com/wildfly/wildfly-core/blob/master/host-controller/src/m...