You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/11/02 13:13:43 UTC

[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1295: IGNITE-17814 Use consistent IDs in Jraft instead of addresses

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


##########
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:
   Everything you say is true, though not related to my changes. Should I create a ticket?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org