]
Paul Ferraro updated WFLY-1951:
-------------------------------
Assignee: Richard Achmatowicz (was: Paul Ferraro)
ha-singleton ElectionPolicy breaks ha-singleton access on deferred
startup of second node
-----------------------------------------------------------------------------------------
Key: WFLY-1951
URL:
https://issues.jboss.org/browse/WFLY-1951
Project: WildFly
Issue Type: Bug
Components: Clustering, EJB, Remoting
Affects Versions: 8.0.0.Alpha4
Reporter: Thomas Frühbeck
Assignee: Richard Achmatowicz
We want to use an election policy for ha-singleton service (SortedElectionPolicy with
NamePreference).
To assure, that only the singleton on the preferred node is accessed we also use a
DeploymentNodeSelector implementing same preference.
If the second node is started _after_ the first node is in full operation, the
ClientContext is not notified of the existence of another node, and does not get the
possibility to select the desired node according to cluster policy:
Node "storage" in full operation:
07:32:30,006 INFO [at.tfr.test.service.ClusterDeploymentNodeSelector] (EJB default - 3)
SELECTOR [storage]
07:32:30,027 INFO [at.tfr.test.service.ClusterDeploymentNodeSelector] (EJB default - 3)
SELECTOR [storage]
Node "NodeB" startup:
07:32:35,045 INFO [at.tfr.test.ClusterClient] (EJB default - 2) Service: Proxy for
remote EJB StatelessEJBLocator{appName='', moduleName='wildfly-cluster',
distinctName='', beanName='ClusterBean', view='interface
at.tfr.test.ClusterRemote'}
07:32:35,048 INFO [at.tfr.test.service.ClusterDeploymentNodeSelector] (EJB default - 2)
SELECTOR [NodeB, storage]
Node "storage": NodeSelector still sees only "storage"
07:32:35,009 INFO [at.tfr.test.service.ClusterDeploymentNodeSelector] (EJB default - 4)
SELECTOR [storage]
07:32:35,011 INFO [at.tfr.test.service.ClusterDeploymentNodeSelector] (EJB default - 4)
SELECTOR [storage]
If the ElectionPolicy now selected a node other than the currently active one
("NodeB" in this case), the access to the ha-singleton will fail, because
"NodeB" is not selectable.