ibessonov commented on code in PR #1295:
URL: https://github.com/apache/ignite-3/pull/1295#discussion_r1012599484


##########
modules/network/src/main/java/org/apache/ignite/network/DefaultMessagingService.java:
##########
@@ -375,33 +334,27 @@ private long createCorrelationId() {
     /**
      * Checks if the target is the current node.
      *
-     * @param target Target cluster node. TODO: IGNITE-16373 May be {@code 
null} due to the ticket.
-     * @param targetSocketAddress Target's socket address.
+     * @param consistentId Target consistent ID. Can be {@code null} if the 
node has not been added to the topology.
+     * @param targetAddress Target address.
      * @return {@code true} if the target is the current node, {@code false} 
otherwise.
      */
-    private boolean isSelf(@Nullable ClusterNode target, @Nullable String 
consistentId, SocketAddress targetSocketAddress) {
-        String cid = consistentId;
-
-        if (cid == null && target != null) {
-            cid = target.name();
+    private boolean isSelf(@Nullable String consistentId, InetSocketAddress 
targetAddress) {
+        if (consistentId != null) {
+            return connectionManager.consistentId().equals(consistentId);
         }
 
-        if (cid != null) {
-            return connectionManager.consistentId().equals(cid);
-        }
+        InetSocketAddress localAddress = connectionManager.localAddress();

Review Comment:
   If you know a good place for it, then sure go ahead. Thank you!



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