ivandasch commented on code in PR #10187:
URL: https://github.com/apache/ignite/pull/10187#discussion_r943653595
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java:
##########
@@ -221,11 +222,21 @@ boolean onCustomEvent(CacheAffinityChangeMessage msg) {
return false;
}
+ boolean isClient = cctx.discovery().localNode().isClient();
+
+ if (cctx.kernalContext().config().getDiscoverySpi() instanceof
TcpDiscoverySpi)
+ isClient &=
!((TcpDiscoverySpi)cctx.kernalContext().config().getDiscoverySpi()).isForceServerMode();
+
// Skip message if affinity was already recalculated.
- boolean exchangeNeeded = lastAffVer == null ||
lastAffVer.equals(msg.topologyVersion());
+ // Client node should just accept the flag from the mutated message.
+ boolean exchangeNeeded = (isClient) ? msg.exchangeNeeded() :
Review Comment:
Is there any need of parenthesis for `isClient`? May be convert these two
lines to one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]