[
https://issues.apache.org/jira/browse/CASSANDRA-15677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139261#comment-17139261
]
Bryn Cooke edited comment on CASSANDRA-15677 at 6/18/20, 2:05 PM:
------------------------------------------------------------------
-This comment seems to indicate that the existing behaviour was a workaround to
the drivers not distinguishing nodes by address and socket:
https://issues.apache.org/jira/browse/CASSANDRA-10052?focusedCommentId=14725534&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14725534-
-It looks like the Java driver no longer has this issue, at least I don't see
any calls to Host#getListenAddress or Host#getBroadcastAddress. Everything
seems to be using address and port.-
[~aboudreault] -how do things look like on the other drivers?-
-Edit:-
-Just had a look at the python driver and Endpoint was added to the Python
driver here:
[https://github.com/datastax/python-driver/blob/c88255f202a21bbbae35f16e603b0f10f2f2cf36/cassandra/connection.py#L116]-
-Node.js has Host support here:
[https://github.com/datastax/nodejs-driver/blob/master/lib/host.js#L41]-
-C# has
[https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/Host.cs#L78]-
-CPP has [https://github.com/datastax/cpp-driver/blob/master/src/host.hpp#L92]-
-So I think all of the drivers can now distinguish between nodes based on node
and port. But it would probably be best for one of the driver devs to weigh in.-
Ignore this. I misread Tyler's comment.
was (Author: bryncooke):
This comment seems to indicate that the existing behaviour was a workaround to
the drivers not distinguishing nodes by address and socket:
https://issues.apache.org/jira/browse/CASSANDRA-10052?focusedCommentId=14725534&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14725534
It looks like the Java driver no longer has this issue, at least I don't see
any calls to Host#getListenAddress or Host#getBroadcastAddress. Everything
seems to be using address and port.
[~aboudreault] how do things look like on the other drivers?
Edit:
Just had a look at the python driver and Endpoint was added to the Python
driver here:
[https://github.com/datastax/python-driver/blob/c88255f202a21bbbae35f16e603b0f10f2f2cf36/cassandra/connection.py#L116]
Node.js has Host support here:
[https://github.com/datastax/nodejs-driver/blob/master/lib/host.js#L41]
C# has
[https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/Host.cs#L78]
CPP has [https://github.com/datastax/cpp-driver/blob/master/src/host.hpp#L92]
So I think all of the drivers can now distinguish between nodes based on node
and port. But it would probably be best for one of the driver devs to weigh in.
> Topology events are not sent to clients if the nodes use the same network
> interface
> -----------------------------------------------------------------------------------
>
> Key: CASSANDRA-15677
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15677
> Project: Cassandra
> Issue Type: Bug
> Components: Messaging/Client
> Reporter: Alan Boudreault
> Assignee: Bryn Cooke
> Priority: Normal
> Labels: pull-request-available
> Fix For: 4.0-alpha5
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> *This bug only happens when the cassandra nodes are configured to use a
> single network interface (ip) but different ports. See CASSANDRA-7544.*
> Issue: The topology events aren't sent to clients. The problem is that the
> port is not taken into account when determining if we send it or not:
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/Server.java#L624
> To reproduce:
> {code}
> # I think the cassandra-test branch is required to get the -S option
> (USE_SINGLE_INTERFACE)
> ccm create -n4 local40 -v 4.0-alpha2 -S
> {code}
>
> Then run this small python driver script:
> {code}
> import time
> from cassandra.cluster import Cluster
> cluster = Cluster()
> session = cluster.connect()
> while True:
> print(cluster.metadata.all_hosts())
> print([h.is_up for h in cluster.metadata.all_hosts()])
> time.sleep(5)
> {code}
> Then decommission a node:
> {code}
> ccm node2 nodetool disablebinary
> ccm node2 nodetool decommission
> {code}
>
> You should see that the node is never removed from the client cluster
> metadata and the reconnector started.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]