ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Mashenkov <andrey.mashen...@gmail.com>
Subject Deprecate force server mode for clients.
Date Thu, 09 Aug 2018 09:41:09 GMT
Hi Igniters,

I've found that KernalContext.clientNode() and TcpDusciveryNode.isClient()
means different and it looks confusing.

1. The first one return true if "node is configured as client" and false
2. The second one can return false if server mode is forced for client (via
TcpDiscoverySpi.setForceServerMode(true)) ,
 so actually true value means "a client node is out of the ring".

Thus, TcpDiscoveryNode.isClient() semantic is broken and  we can get
confusing results on client node with forced server mode,
when kernalContext.clientNode() return true and
kernalContex.localNode().isClient() return false.

Also, we have a number of places in code where node.isClient() method is

My suggestion is
1. Deprecate force server mode and plan to remove it to next major release.
2. Fix TcpDiscoveryNode,isClient() semantic e.g. to use node attributes to
make ClusterNode.isClient method consistent with node configuration.
2. Add isRingNode (possibly package private) with current
TcpDiscoveryNode.isClient() semantic to preserve compatibility.

Any pros or cons?

Best regards,
Andrey V. Mashenkov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message