Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.16
-
None
Description
- Thick clients have thin client connector enabled by default
- ClientClusterGroupGetNodesEndpointsResponse excludes client nodes
As a result:
- Thin client connects to a thick client node
- Gets node endpoints - current connection is not there
- Thin client closes current connection immediately
The following test demonstrates the problem. While setForceServerMode is deprecated, there could be other reasons for other nodes to be unreachable.
@Test public void testConnectToThickClient() { TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() .setIpFinder(new TcpDiscoveryVmIpFinder(true)) .setForceServerMode(true); IgniteConfiguration igniteCfg = new IgniteConfiguration() .setDiscoverySpi(discoSpi); try (Ignite ignored = Ignition.start(igniteCfg); IgniteClient client = Ignition.startClient(new ClientConfiguration()) ) { assertNotNull(client); } }
Potential solutions:
- Disable client connector on thick client nodes by default (breaking change?)
- Fix ClientClusterGroupGetNodesEndpointsResponse to include thick client nodes if connector is enabled, and let the client decide whether to connect to them or not