rpuch commented on code in PR #3326:
URL: https://github.com/apache/ignite-3/pull/3326#discussion_r1508802399


##########
modules/network/src/main/java/org/apache/ignite/internal/network/recovery/RecoveryClientHandshakeManager.java:
##########
@@ -237,17 +230,16 @@ private void 
onHandshakeStartMessage(HandshakeStartMessage handshakeStartMessage
             return;
         }
 
-        this.remoteLaunchId = handshakeStartMessage.launchId();
-        this.remoteConsistentId = handshakeStartMessage.consistentId();
+        this.remoteNode = handshakeStartMessage.serverNode().asClusterNode();
 
-        ChannelKey channelKey = new ChannelKey(remoteConsistentId, 
remoteLaunchId, connectionId);
+        ChannelKey channelKey = new ChannelKey(remoteNode.name(), 
UUID.fromString(remoteNode.id()), connectionId);

Review Comment:
   `ChannelKey` is defined as a triple `<consistentId, launchId, 
channelIndex>`. According to the `ClusterNodeImpl` code, it considers 2 nodes 
equal if their name and address match. The ID is not even taken into 
consideration (which is weird, by the way). So with the current code 
replacement of `<node, channelIndex>` will just break everything.
   
   Even if it did not break it (due to having a compatible equals semantics), 
it seems more straightforward and safer to list the components explicitly.



-- 
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]

Reply via email to