maedhroz commented on code in PR #2255:
URL: https://github.com/apache/cassandra/pull/2255#discussion_r1153619029


##########
src/java/org/apache/cassandra/streaming/async/NettyStreamingMessageSender.java:
##########
@@ -238,7 +238,7 @@ public void sendMessage(StreamMessage message)
                 logger.debug("{} Sending {}", createLogTag(session, null), 
message);
 
             // Supply a preferred IP up-front to avoid trying to get it in the 
executor thread, which can be interrupted.
-            OutboundConnectionSettings templateWithConnectTo = 
template.withConnectTo(template.connectTo());
+            OutboundConnectionSettings templateWithConnectTo = 
factory.supportsPreferredIp() ? template.withConnectTo(template.connectTo()) : 
template;

Review Comment:
   Path is tested in `SSTableLoaderEncryptionOptionsTest`



##########
src/java/org/apache/cassandra/streaming/async/NettyStreamingMessageSender.java:
##########
@@ -238,7 +238,7 @@ public void sendMessage(StreamMessage message)
                 logger.debug("{} Sending {}", createLogTag(session, null), 
message);
 
             // Supply a preferred IP up-front to avoid trying to get it in the 
executor thread, which can be interrupted.
-            OutboundConnectionSettings templateWithConnectTo = 
template.withConnectTo(template.connectTo());
+            OutboundConnectionSettings templateWithConnectTo = 
factory.supportsPreferredIp() ? template.withConnectTo(template.connectTo()) : 
template;

Review Comment:
   Note: This path is tested in `SSTableLoaderEncryptionOptionsTest`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to