Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
8.0.0.Alpha4
-
None
Description
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.