[ 
https://issues.apache.org/jira/browse/CASSANDRA-18200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681203#comment-17681203
 ] 

Maciej Sokol edited comment on CASSANDRA-18200 at 1/27/23 7:13 AM:
-------------------------------------------------------------------

If I understand you correctly, you want prefer_local to affect the local node 
as well and not always use local IP?

I have also tried to use prefer_local, it only affects the peers not the 
messaging to node itself.

I've tested Cassandra 4 with my patch and now it works correctly, previously 
ranged queries and other communication within node through messaging did not 
work (because the pod behind LB cannot connect to itself through LB).


was (Author: JIRAUSER285315):
If I understand you correctly, you want prefer_local to affect the local node 
as well and not always use local IP?

I have also tried to use prefer_local despite the ticket you linked, it only 
affects the peers not the messaging to node itself.

Btw, I've tested Cassandra 4 with my patch and now it works correctly, 
previously ranged queries and other communication within node through messaging 
did not work (because the pod behind LB cannot connect to itself through LB).

> Cassandra messaging to self changed behavior
> --------------------------------------------
>
>                 Key: CASSANDRA-18200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18200
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Messaging/Internode
>            Reporter: Maciej Sokol
>            Priority: Normal
>         Attachments: patch.txt
>
>
> During testing of Cassandra on AWS, we noticed some behavior changes between 
> Cassandra 3.11 and Cassandra 4.0 when it comes to messaging.
> When performing a range query with consistency local_quorum, Cassandra sents 
> a request to itself and some peers.
> In case of Cassandra 4.0, it's trying to connect to itself using the 
> broadcast_address while in Cassandra 3.11 it's connecting using the local 
> address (see 
> [https://github.com/apache/cassandra/blob/cassandra-3.11/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java#L152].
> This translation seems to be missing in Cassandra 4.X. I think the best place 
> to fix it would be here (see attached file): 
> [https://github.com/apache/cassandra/blob/cassandra-4.0/src/java/org/apache/cassandra/net/OutboundConnectionSettings.java#L451]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to