joao-r-reis commented on code in PR #1913:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1913#discussion_r2420153462
##########
host_source.go:
##########
@@ -680,16 +680,7 @@ func newHostInfoFromRow(s *Session, defaultAddr net.IP,
defaultPort int, row map
}
}
- // Determine the connect address from available addresses
- if validIpAddr(host.rpcAddress) {
- host.connectAddress = host.rpcAddress
- } else if validIpAddr(host.preferredIP) {
- host.connectAddress = host.preferredIP
- } else if validIpAddr(host.broadcastAddress) {
- host.connectAddress = host.broadcastAddress
- } else if validIpAddr(host.peer) {
- host.connectAddress = host.peer
- }
+ host.connectAddress, _ = host.connectAddressLocked()
Review Comment:
I don't think this is the case, the initial connect address is retrieved
from the current connection OR `nil`, if it's nil then this will make it so
that the IP comes from system tables because `connectAddressLocked()` goes down
a list of 4 ip addresses until it finds a valid one
--
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]