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


##########
modules/network/src/main/java/org/apache/ignite/network/DefaultMessagingService.java:
##########
@@ -128,54 +115,37 @@ public void weakSend(ClusterNode recipient, 
NetworkMessage msg) {
     /** {@inheritDoc} */
     @Override
     public CompletableFuture<Void> send(ClusterNode recipient, NetworkMessage 
msg) {
-        return send0(recipient, recipient.address(), msg, null);
+        return send0(recipient, msg, null);
     }
 
     /** {@inheritDoc} */
     @Override
     public CompletableFuture<Void> respond(ClusterNode recipient, 
NetworkMessage msg, long correlationId) {
-        return send0(recipient, recipient.address(), msg, correlationId);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public CompletableFuture<Void> respond(NetworkAddress addr, NetworkMessage 
msg, long correlationId) {
-        ClusterNode recipient = topologyService.getByAddress(addr);
-        return send0(recipient, addr, msg, correlationId);
+        return send0(recipient, msg, correlationId);
     }
 
     /** {@inheritDoc} */
     @Override
     public CompletableFuture<NetworkMessage> invoke(ClusterNode recipient, 
NetworkMessage msg, long timeout) {
-        return invoke0(recipient, recipient.address(), msg, timeout);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public CompletableFuture<NetworkMessage> invoke(NetworkAddress addr, 
NetworkMessage msg, long timeout) {
-        ClusterNode recipient = topologyService.getByAddress(addr);
-
-        return invoke0(recipient, addr, msg, timeout);
+        return invoke0(recipient, msg, timeout);
     }
 
     /**
      * Sends a message. If the target is the current node, then message will 
be delivered immediately.
      *
-     * @param recipient Target cluster node. TODO: Maybe {@code null} due to 
IGNITE-16373.
-     * @param address Target address.
+     * @param recipient Target cluster node.
      * @param msg Message.
      * @param correlationId Correlation id. Not null iff the message is a 
response to a {@link #invoke} request.
      * @return Future of the send operation.
      */
-    private CompletableFuture<Void> send0(@Nullable ClusterNode recipient, 
NetworkAddress address, NetworkMessage msg,
-            @Nullable Long correlationId) {
+    private CompletableFuture<Void> send0(ClusterNode recipient, 
NetworkMessage msg, @Nullable Long correlationId) {
         if (connectionManager.isStopped()) {
             return failedFuture(new NodeStoppingException());
         }
 
-        InetSocketAddress addr = new InetSocketAddress(address.host(), 
address.port());
+        InetSocketAddress recipientAddress = new 
InetSocketAddress(recipient.address().host(), recipient.address().port());

Review Comment:
   Actually, we need to investigate this, I think this address might already be 
resolved



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