-
Notifications
You must be signed in to change notification settings - Fork 643
CASSGO-91 Prefer connection address over system local addresses #1913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bc30a7e to
d1f70d0
Compare
|
Pushed a change to this line here, this might fix #1873 |
host_source.go
Outdated
| } | ||
|
|
||
| host, err := r.session.hostInfoFromIter(iter, nil, r.session.cfg.Port) | ||
| host, err := r.session.hostInfoFromIter(iter, iter.host.connectAddress, r.session.cfg.Port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need to lock mu? Do we need a new function that's like ActualConnectAddress that does the locking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you're right I think, I should probably use host.ConnectAddress() instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually ConnectAddress() will do all the logic to falback to other columns so I probably need to add a new method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
d1f70d0 to
8f77051
Compare
8f77051 to
cf12fa1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I'd like to see some more comments around the changed lines so we understand the nuances of why they're doing something specific because it's not obvious when looking at the code in places.
There is an unintended change in 2.0-rc1 causing the driver to prefer system table addresses over the connection address which breaks deployments that rely on this behavior from 1.x. This patch fixes this and keeps the behavior the same as it was in 1.x. It also fixes an issue where connection address was not being used when a full ring refresh was triggered. Patch by João Reis; reviewed by James Hartig for CASSGO-91
cf12fa1 to
7e4069e
Compare
good point, done |
There is an unintended change in 2.0-rc1 causing the driver to prefer system table addresses over the connection address which breaks deployments that rely on this behavior from 1.x.
This patch fixes this and keeps the behavior the same as it was in 1.x.